essenz Posted December 3, 2003 Share Posted December 3, 2003 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 Quote Link to comment https://forums.phpfreaks.com/topic/1458-duplicate-entry-0-for-key-1/ Share on other sites More sharing options...
triphis Posted December 4, 2003 Share Posted December 4, 2003 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 lol, not the best solution, but I do not know what else to suggest Quote Link to comment https://forums.phpfreaks.com/topic/1458-duplicate-entry-0-for-key-1/#findComment-4815 Share on other sites More sharing options...
essenz Posted December 4, 2003 Author Share Posted December 4, 2003 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 Quote Link to comment https://forums.phpfreaks.com/topic/1458-duplicate-entry-0-for-key-1/#findComment-4817 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.