
July 21st, 2004, 02:54 AM
|
|
|
|
Join Date: Apr 2007
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
PEAR::DB Transactions
The following SQL query is executed, even though I have it set to rollback. MySQL 4.0.20, PEAR :: DB 1.6.5
php Code:
Original
- php Code |
|
|
|
if (!$db->provides('transactions')) { die("This part doesn't evaluate"); } $db->autoCommit(false); $sql = "DELETE FROM choices WHERE member = ?"; $res =& $db-> query($sql, array($this-> member-> id)); $db->rollback(); $db->autoCommit(true);
Obviously it makes no sense to rollback right after a query, but I have shortened this code down (and tested) so that it's easier to work with. I've also tried using $db->query('BEGIN TRANSACTION') and $db->query('ROLLBACK TRANSACTION') where appropriate -- still nothing.
TIA
|