in reply to Re^2: getting the ids of records affected by an input statement
in thread getting the ids of records affected by an input statement

Why do you need a transaction though?
  1. You're modifying the database. Not putting a database modification inside a transaction is far more unforgivable than not ever using strict, warnings or checking the return values of system calls. In fact, if it were my call, not putting database modifications inside transactions would put you on the fast track to getting fired.
  2. You do not want the state (or to be precise, your view) of the database to actually change between the select and the update. Hence the transaction. (I'm assuming you have a proper default isolation level active).
  • Comment on Re^3: getting the ids of records affected by an input statement