I have a table like this:

unique_serial - Auto Increment
field_1
field_2
field_3

The Primary key is a combination of field_1, field_2, and field_3.
I want to do:

INSERT IGNORE INTO table_name (field_1,field_2,field_3) VALUES ('xx','xx','xx')

Sometimes this will be an existing record, sometimes it will create a new record. In either case I want to return the value of unique_serial. Is there any way to get my INSERT IGNORE to return this value, saving me the need to perform a second query?

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

Reply via email to