I have two tables with bigint:
table1 id bigint(20) PK autoincrement name varchar(40), text table2 id bigint(20) PK autoincrement created datetime text_fiel
You need to CONVERT it to a string in SQL before getting it into PHP. In PHP, you can use GMP to handle the number.
MySQL docs on converting: http://dev.mysql.com/doc/refman/5.7/en/cast-functions.html#function_convert