RedRed!com IT Department wrote:



So, for my peace of mind, I would need to follow these procedures to ensure Martijn's issue doesn't happen:

1. lock the table
2. execute my select
3. insert if it does not already exist
4. unlock the table

On a high level, is this a correct list of procedures?

Sean

I would just do the insert, and check for a duplicate key error.
If I get the duplicate key error, then update the record if necessary.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to