Re: Inserting/updating only when combo of fields is unique

2006-09-27 Thread Brian Dunning
Thanks Dan, I believe that's exactly what I was looking for. Thanks for not saying "RTFM" even though it clearly applies. :) On Sep 27, 2006, at 12:57 PM, Dan Julson wrote: Brian, Look at the ON DUPLICATE KEY UPDATE syntax within the INSERT SYNTAX of the Docs. That should give you wha

Re: Inserting/updating only when combo of fields is unique

2006-09-27 Thread Dan Julson
Brian, Look at the ON DUPLICATE KEY UPDATE syntax within the INSERT SYNTAX of the Docs. That should give you what you want. -Dan I have a need to insert a record only when the combination of 3 fields is unique. I do this by having an index with all 3 fields, and doing an INSERT IGNORE. This w

Inserting/updating only when combo of fields is unique

2006-09-27 Thread Brian Dunning
I have a need to insert a record only when the combination of 3 fields is unique. I do this by having an index with all 3 fields, and doing an INSERT IGNORE. This works fine. Here's the element I can't figure out how to add: When there is a pre- existing record, I want to update two of its c