I am getting this error when I try to enter my second set of info into the database. Even with the error the data still goes in.
I have to rebuilt my database and it still happens. I have no idea where to look for the error.
I am getting this error when I try to enter my second set of info into the database. Even with the error the data still goes in.
I have to rebuilt my database and it still happens. I have no idea where to look for the error.
Tough to debug without any code, but it kind of looks like some value you are passing to your query for a unique field is empty.
It looks to me that you don't have auto increment set for your primary key.
My primary ID is the username so it doesn't auto increment. Isn't this the only field that would receive this error? The rest shouldn't make any difference if the data is all the same, right??
Why would I get the error and still have all the data upload correctly? that's what bugging me. Anyway i can make it give me more info on the error msg?
From my form::
<label for='userid'>Username: </label> <input type='text' name='userID' class='zip' size=25'>
harkly wrote:Anyway i can make it give me more info on the error msg?
Not really; it's given you all the information that it can: you're trying to insert a row with the same value for a primary/unique key as another existing row.
As NogDog pointed out, it's tough for us to debug your code when we can't see it.
It's not necessarily the primary key, any column with a unique index assigned to it will also be referred to as a "key" in that error message, I believe.
Thanks all! I went thru my DB table by table and found my problem!!! Exactly what you said, primary key was not auto-incrementing.