MySQL problem

I’m trying to insert values into a database but I keep getting this mysql error that says

“Duplicate entry ‘0’ for key 1”

Can anybody tell me what this means?

it means that there is a duplicate entry where there shouldn’t be. It means that you have the database set up so that certain field can not have duplicate entries. Your best bet is install phpMyAdmin so that you can easily fix and set up your databases…

www.phpmyadmin.net :wink:

Thanks a bunch for your help guyz.

Each row in a mySQL database must have a unique ID, or primary key. I recommend in your table specfics setting that primary key (which is almost always the first column) to AUTO_INCREMENT, NOT NULL, and if it isn’t already.

This way, you can write INSERT INTO Table VALUES(’’,‘data’,‘data’…); and your key will auto increment for you and it will be unique.