Suppose i wan't to insert Data into 2 different tables, in codeigniter,
for example :
Insert into UserProfile table: name , mail to (get an id and use it in the next table)
Insert Employees table : UserProfile_id, shifts , position.
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?