title: Mysql: ROLLBACK for multiple queries
body: <p>I have more than three MySql queries in a PHP script triggered by scheduled task. If a query catch an error, script throw an exception and rollback that Mysql query. It works fine.</p>
  
  <p>However if first query works fine, but not 2nd query, throw an exception, it rollback 2nd one but not 1st query. </p>
  
  <p>I am using begin_trans(), commit and rollback() for individual queries because Sometimes i need to rollback one query, sometimes all queries. Is there any way to rollback one query or all queries?</p>
  
  <p>Thanks in advance</p>
  
  <p>UPDATE:</p>
  
  <p>I got it working, there was no problem with in begin_trans(), commit and rollback(), the database connection config was different for one query from other queries, crazy code without any comments!!!</p>