PHPro Posted October 21, 2009 Share Posted October 21, 2009 I cant seem to insert data to my database this keeps poppingout. What problem causes this error to come out. anyone? Duplicate entry '' for key 'Tester' Thank you Quote Link to comment https://forums.phpfreaks.com/topic/178449-solved-duplicate-entry/ Share on other sites More sharing options...
Bricktop Posted October 21, 2009 Share Posted October 21, 2009 Hi PHPro, Without seeing your code it's hard to tell. Post your code and we'll be able to give a more definitive answer. Quote Link to comment https://forums.phpfreaks.com/topic/178449-solved-duplicate-entry/#findComment-941030 Share on other sites More sharing options...
PHPro Posted October 21, 2009 Author Share Posted October 21, 2009 This is the query im throwing product title comes from a text and product Comment is from textarea $q = "INSERT INTO products (Product_Title, Product_Comment) VALUES('$PT','$PC')"; this error comes out System Error Occured - Duplicate entry '' for key 'Tester' Query: INSERT INTO products (Product_Title, Product_Comment) VALUES('safsdafs','safdsafsa') Quote Link to comment https://forums.phpfreaks.com/topic/178449-solved-duplicate-entry/#findComment-941033 Share on other sites More sharing options...
PHPro Posted October 21, 2009 Author Share Posted October 21, 2009 Ive fixed it. It seems that my Table is causing this. I dont know why, but I just created a new Table and it went well. just letting those who encounter the same problem know. Quote Link to comment https://forums.phpfreaks.com/topic/178449-solved-duplicate-entry/#findComment-941057 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.