Dear All,
I tried running this code via the SQL query field in PHPMyAdmin:
INSERT IGNORE INTO `Table` (FName) VALUE ('Dave')
Table name='Table'
Column name='FName'
I read that this code suppose was suppose to prevent entering duplicate entries. But after entering 'Dave' in the FName column I still ended up with duplicates after executing this command. The name 'Dave' continue to be added everytime this command is executed.
Can you guys advise me if I am doing anything wrong. You can test it yourself and see if you are succeeding in preventing duplicate entries.
Looking forward to your responses.
Thanks
Dave
INSERT IGNORE for duplicate entry not working
Moderator: General Moderators
Re: INSERT IGNORE for duplicate entry not working
Is FName set as unique in the database?
Re: INSERT IGNORE for duplicate entry not working
Darhazer,
thank you thank you very much, crap I missed that, I did not set unique key. Now I do and it works.
thanks again mate
Dave
thank you thank you very much, crap I missed that, I did not set unique key. Now I do and it works.
thanks again mate
Dave