PHP mysql bigint issue -


i have 2 tables bigint:

table1 id bigint(20) pk autoincrement name varchar(40), text  table2 id bigint(20) pk autoincrement created datetime text_field id_table1_ref bigint(20) 

after inserting data table1 , trying insert table1.id table2.id_table1_ref, number different, i.e.:

number 1552545662588 table1.t1 becomes 1552545662, or worse, negative number.

i know issue settings, can't figure out how manage this. tried set signed/unasigned values fields, doesn't work.

this happening on unix local computer, on server working ok, @ least now.

any appreciated.

you need convert string in sql before getting php. in php, can use gmp handle number.

mysql docs on converting: http://dev.mysql.com/doc/refman/5.7/en/cast-functions.html#function_convert


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -