There could be a number of causes for this error if you are using PHP, but I would start at the SQL level to make sure you know what your increment value is set to. You can do this with the following command:

ALTER TABLE <TABLE NAME HERE> AUTO_INCREMENT = 1;

This will set the value to 1 and you can work from there on, so you know what to expect in your php variable. Are you using a MySQL function to retrieve the result set of you sql query and then assign the increment result to a php $variable?

Regards,

http://www.freemysql.org