I am facing huge problem...
I have to provide that my code will handle transactions and at this particular moment I can not do so.
Particular moment means I've created specialized classes which relates to appropriate tables in the database.
For example class XQuery is to control insert,remove,update queries just for X table.
XQuery inherits from pure abstract class (an interface,declarations of insert,remove,update) and helping class (contains additional information,methods etc), so I have multiple inheritance here.
I just wanted to separate code strictly responsible for executing the queries from the code which works with the results and provide other vital informations.

That's enough for explanation.

What is true nature of the problem is there is no ONE scenario I could follow in the case of executing multiple queries with the transaction mode on. What makes it more complicated is that I want to make it as far automatic as possible - methods knows itself which action must be taken, when there is a lastInsertedId needed and so on.

By know I have class which gathers others XQuery's objects along with the flag describing the action(insert,update,remove).
But I am stuck anyway, so a little tip would be more than helpful.