Link to home
Start Free TrialLog in
Avatar of pingeyeg
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());
SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pingeyeg
pingeyeg

ASKER

Table: Replies

Fields: intReply_ID, strReply, strReply_Name, strTime
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.