Or, of course, a selection of fields as a unique key. The insert will fail if there is an exisiting record with that key; you can interrogate the error and report on the exisitence of a duplicate record.
The select/lock method is used for update purposes ('select for update' et
al.), not to keep duplicate records out of the DB.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

