It sounds like the auto_increment field is messed up. That field is supposed to automatically be populated with the next available number, always getting bigger, since it keeps trying to put it in as zero it sounds like that's the problem. I'm not sure how that can be fixed, but I'll see if I can find any info.