I am trying to read data stored in a MySQL table, the column is defined as binary (8). Data can be double or uint64. To convert this data to double, I am using unpack ("d", $data) and for uint64, I am using unpack ("Q", $data).
With uint64, I appear to be getting right results for smaller numbers (3, 40, etc) but not for larger numbers. The other problem is that with double, the results do not appear to match.
Am I doing this right or should I be looking at some other way to convert other than unpack?
Thanks for your help.