Hiya to all..
I have a web app that utilises MySQL as the DB back-end. To keep it simple, it has a single table called testbigint and has only 1 field called testval and is set to BigInt(20) - Unsigned and holds the value returned from the MySQL Function uuid_short() - according to the MySQL document it generates a unsigned (see [mariadb.com] for details).
Anyways, with my hosting (IONOS), when I insert the value that is generated from UUID_SHORT() it returned the following value: 10331511505513676677
So using the following lines of code
$bigval = 10331511505513676677;
var_dump($bigval);
Now examining this value via var_dump() it has now converted the number into a float and a loss of precision will follow, for completeness - var_dump() returns 1.0331511505514E+19
According to PHP documentation, PHP is unable to handle unsigned 64bit integers, but how can $bigval be converted into a string
Also, I am using a 64bit version of WampServer
Thanks in advance
I have a web app that utilises MySQL as the DB back-end. To keep it simple, it has a single table called testbigint and has only 1 field called testval and is set to BigInt(20) - Unsigned and holds the value returned from the MySQL Function uuid_short() - according to the MySQL document it generates a unsigned (see [mariadb.com] for details).
Anyways, with my hosting (IONOS), when I insert the value that is generated from UUID_SHORT() it returned the following value: 10331511505513676677
So using the following lines of code
$bigval = 10331511505513676677;
var_dump($bigval);
Now examining this value via var_dump() it has now converted the number into a float and a loss of precision will follow, for completeness - var_dump() returns 1.0331511505514E+19
According to PHP documentation, PHP is unable to handle unsigned 64bit integers, but how can $bigval be converted into a string
Also, I am using a 64bit version of WampServer
Thanks in advance