Marco Rossi - 2013-01-17 12:34:27
Hi!
It's correct utilize the transactions in this way?
try
{
$db_pdo->transaction("B");
$db_pdo->delete("test_insert");
$db_pdo->transaction("C"); //Commit and apply changes
}catch(PDOException $e) {
$db_pdo->transaction("R");
}
And make SELECT in this way?
$db_pdo->transaction("B");
$stmt = $db_pdo->query("SELECT * FROM test_insert;");
$db_pdo->transaction("C"); //Commit and apply changes
$stmt->setFetchMode(PDO::FETCH_ASSOC);
$arrValues = $stmt->fetchAll();
Thank you very much!!
Byezz