I'm not entirely sure I understand transactions, but will this work as a transaction (I ask this because we have update->!sql_affected_rows->insert)?