I just uploaded my website on my server and im facing a problem in inserting the data into MySQL table.
I echoed mysql_error
and I get the following:
Out of range value adjusted for column 'id' at row 1.
ID is an auto_increment
value (INT(11)) and my query is as follows:
INSERT INTO table (id,x,x) VALUES ('','$x','$x')
I cant figure out what to do. Any ideas ?
Try to set NULL . it will take auto increment value for id column.
Example
INSERT INTO table (id,x,x) VALUES (NULL,'$x','$x');
There is an issue in query:
INSERT INTO table (id,x,x) VALUES (NULL,'$x','$x');
why column x is repeated here. Use it only once and drop the id column from query like:
INSERT INTO table (x,x) VALUES ('$x','$x');
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.