Mysql transactions issue
- by Stann
In straight mysql script I'd do transactions like this:
START TRANSACTION;
SELECT @A:=SUM(salary) FROM table1 WHERE type=1;
UPDATE table2 SET summary=@A WHERE type=1;
COMMIT;
i'm a little confused about how transactions work in PDO. It looks like there are beginTransaction() and commit() methods - so I'm not sure are these just convenience…