| List: | General Discussion | « Previous MessageNext Message » | |
| From: | gerald_clark | Date: | March 16 2006 2:11pm |
| Subject: | Re: What is the proper (least expensive) way to do this | ||
| View as plain text | |||
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.
| Thread | ||
|---|---|---|
| • What is the proper (least expensive) way to do this | Connie A. Logg | 15 Mar |
| • Re: What is the proper (least expensive) way to do this | Martijn Tonies | 15 Mar |
| • Re: What is the proper (least expensive) way to do this | RedRed!com IT Department | 15 Mar |
| • Re: What is the proper (least expensive) way to do this | gerald_clark | 16 Mar |
| • MySQL Query Browser 1.1.20 problem | Mojtaba Faridzad | 15 Mar |
