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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -