I am getting this error when i try to insert data into my mysql database.
Field 'id' doesn't have a default value
Does anybody know why I would be getting this?
Field 'id' doesn't have a default value
Moderator: General Moderators
-
DaiLaughing
- Forum Commoner
- Posts: 76
- Joined: Thu Jul 16, 2009 8:03 am
Re: Field 'id' doesn't have a default value
Have you forgotten to include a value for id in your query? MySQL is missing that value and doesn't have a default one to put in. If it is the primary key you probably need to make it auto-increment.
Re: Field 'id' doesn't have a default value
That was my first thought, but when I went into the database and checked, it is set to auto-increment.