I cant seem to get this right. I have created if statements to diagnose where I keep on having the query error, and just like i thought, it was in the INSERT INTO code. Here is the code, can someone look at this for me and see if The code is in anyway wrong, (misspelling, punctuation and etc.?)
why are you putting a blank value into the id field?
if its an auto-increment primary key, then just leave that alone and it will automatically add it itself.
ok. Well, I seem to still be getting an error, but the detailed error did give me a different suggestion as to what the problem is, but I have no idea what the error means. I get this as the error.
no problem. for those that didn’t understand, the
"Duplicate entry ‘0’ for key 1" error message was because the field was set as a primary key, but skyler was unintentionally trying to insert a duplicate value. to fix the problem, just set as auto increment and make sure the starting auto increment number does not already exist in the table.