hoverinc Posted January 27, 2011 Share Posted January 27, 2011 Good morning everybody... need to know please how to delete duplicate id in the same field. Any help is most appreciated Quote Link to comment https://forums.phpfreaks.com/topic/225828-how-to-delete-duplicate-entries-in-a-field/ Share on other sites More sharing options...
PFMaBiSmAd Posted January 27, 2011 Share Posted January 27, 2011 Define: duplicate id in the same field? An example of what data you have would help. Quote Link to comment https://forums.phpfreaks.com/topic/225828-how-to-delete-duplicate-entries-in-a-field/#findComment-1165930 Share on other sites More sharing options...
hoverinc Posted January 27, 2011 Author Share Posted January 27, 2011 Thanks PFMaBiSmAd i have a field which contains data they are number of type int, so i have combined them from two tables and they are in field but when i select field from table where the same field=some condition returns about 3 records of the same data, that's i want to eliminate the redundant records, hope it is clear, if no i hope to make it better clear so that can have some solution, with so many thanks again PFMaBiSmAd Quote Link to comment https://forums.phpfreaks.com/topic/225828-how-to-delete-duplicate-entries-in-a-field/#findComment-1165932 Share on other sites More sharing options...
hoverinc Posted January 27, 2011 Author Share Posted January 27, 2011 Thanks i solved it using this mysql> INSERT IGNORE INTO person_tbl (last_name, first_name) -> VALUES( 'Jay', 'Thomas'); Query OK, 1 row affected (0.00 sec) mysql> INSERT IGNORE INTO person_tbl (last_name, first_name) -> VALUES( 'Jay', 'Thomas'); Query OK, 0 rows affected (0.00 sec) Quote Link to comment https://forums.phpfreaks.com/topic/225828-how-to-delete-duplicate-entries-in-a-field/#findComment-1165954 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.