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 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 columns, rather than adding a new record. Any suggestions??? -- -Dan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]