Click to See Complete Forum and Search --> : Problem With Auto Increment (MySQL, Newest Version)


evenstar7139
07-03-2007, 07:52 PM
Ok before I got my own server I used to assign an auto increment value by leaving that field blank when inserting something into the database. The database would automatically give it an integer value itself based on whatever the highest value was + 1. Well now I'm on a different server and when I try to do this it gives me this error:

Incorrect integer value: '' for column 'idnumber' at row 1

Idnumber is the auto increment collum.

Is there something I need to turn on in the MySQL settings? (I own this server so I have full control.)

evenstar7139
07-04-2007, 02:45 AM
Nevermind I figured this one out too.

FOR FUTURE REFERENCE FOR ANYBODY WHO READS THIS THREAD:

I was inserting idnumber into the database with an empty value along with everything else for that new row. Just simply take that out.