Mike Knox wrote:
Traditionally, I'd take the following approachYou have to lock the table first, or another user might insert the record between 1 and 2.
1) Update - assume it's there 2) If update fails (0 rows) do an insert
Thats assuming that the update case is more prevalent. If the row is unlikely to be there - insert and do the update if you get a duplicate key.
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]