title: Is it possible to rollback function action in CodeIgniter
body: <p>Suppose i wan't to insert Data into 2 different tables, in codeigniter, </p>
  
  <p>for example :</p>
  
  <ul>
  <li><p>Insert into <strong>UserProfile</strong> table: name , mail to 
  (get an id and use it in the next table) </p></li>
  <li><p>Insert <strong>Employees</strong> table : UserProfile_id, shifts , position.</p></li>
  </ul>
  
  <p>Up to now, all is working good, what can i do if i want to commit the action only if  both insertions are commited...how can i rollback in case the first insertion went well and i don't want an empty profile....
  My problem is that once the first insertion is committed ,suppose something went wrong in the next insertion - i get data to one table... any ideas?</p>