pingeyeg
asked on
Error in SQL Insert statement
Home come I am getting this error when trying to insert a new row in a table?
Duplicate entry '0' for key 1
This is my sql insert statement:
$sql_insert = mysql_query("INSERT INTO Replies (strReply, strReply_Name, strTime) VALUES ('$strReply', '$strReply_Name', '$strTime')") or die(mysql_error());
Duplicate entry '0' for key 1
This is my sql insert statement:
$sql_insert = mysql_query("INSERT INTO Replies (strReply, strReply_Name, strTime) VALUES ('$strReply', '$strReply_Name', '$strTime')") or die(mysql_error());
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Wow how did I miss that. I thought I had already assigned both ID's in my tables to auto-increment. I guess it didn't take or something. Anyway, thanks!
No problemo.
ASKER
Fields: intReply_ID, strReply, strReply_Name, strTime