Transactions in Drupal 6 I am running drupal 6.22 with MySQL. There is no drupal 6 API for using transactions. Since I am new to drupal, I do not know which is the best way to use transactions using the existing drupal APIs? Can anyone guide me on this?
Transactions are done with SQL and in Drupal 6 you need to write all your SQL. So to use transactions, all you need to do, is to use db_query(SQL) and include transaction in the SQL you create.

This could look like this:

$sql = 'START TRANSACTION;
       SELECT @A:=SUM(salary) FROM table1 WHERE type=1;
       UPDATE table2 SET summary=@A WHERE type=1;
       COMMIT;';
db_query($sql);


Remember to use an engine that supports transactions like innodb.