PHP mysql bigint issue

前端 未结 3 1057
我寻月下人不归
我寻月下人不归 2020-12-19 17:16

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         


        
3条回答
  •  执念已碎
    2020-12-19 18:03

    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

提交回复
热议问题