Jump to content

Archived

This topic is now archived and is closed to further replies.

essenz

Duplicate entry '0' for key 1

Recommended Posts

I\'ve got a members area and a forum, now I figured that I should be able to use one table to handle the user info and login process.

 

So I installed the forum and then wrote a php script for the new users to register and I want it to insert the info into the forum members table.

 

But I can\'t seem to get around this:

 

Duplicate entry \'0\' for key 1

 

Any suggestions?

 

I\'m using ipb forum.

 

Thanks

 

Essenz

Share this post


Link to post
Share on other sites

Most likely the id or name column is set to \"unique\" or something. The id is also probably set to auto_increment. I don\'t know if you understand PHP or not, so either:

 

Make sure the form process page that puts the info into the tables in like:

 

INSERT INTO table (id,name,email,whatever) VALUES (\'\',\'$name\',\'$email\',\'$whatever\');

 

Notice the value for ID is blank, because the database auto matically does that for you...

 

OR if you don\'t know PHP...

 

Delete the \"unique\" and other kets from the table, uning PHPMY Admin :P lol, not the best solution, but I do not know what else to suggest

Share this post


Link to post
Share on other sites

Apperantly the ipb_members table ID column isn\'t Auto_increment, so I hall change this and see what happens.

 

Thanks for the tip.

 

essenz

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.