before you use INSERT, you can do a SELECT with the data that you want to insert, if will return 0 record, then you will insert it, else no....
another approach is to use the right primary key (like name, surname) so that the db will reject record when you insert something with the same name,surname.
__________________
Last edited by dany_dev; 06-17-2011 at 07:29 AM.
|