in reply to getting the ids of records affected by an input statement

The SQL spec allows an UPDATE statement to have a 'RETURNING' clause, which will (I think) do exactly what you want. Unfortunately it's not implemented in MySQL. It's been in Postgres since version 8.2 and is documented here.

  • Comment on Re: getting the ids of records affected by an input statement