Lines Matching refs:db
11 $db = PDOTest::factory();
13 $db->beginTransaction();
18 if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') {
20 if (false === MySQLPDOTest::detect_transactional_mysql_engine($db)) {
29 $db = PDOTest::factory();
31 if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') {
33 $suf = ' ENGINE=' . MySQLPDOTest::detect_transactional_mysql_engine($db);
38 $db->exec('CREATE TABLE test(id INT NOT NULL PRIMARY KEY, val VARCHAR(10))'.$suf);
39 $db->exec("INSERT INTO test VALUES(1, 'A')");
40 $db->exec("INSERT INTO test VALUES(2, 'B')");
41 $db->exec("INSERT INTO test VALUES(3, 'C')");
42 $delete = $db->prepare('DELETE FROM test');
45 global $db;
46 $select = $db->prepare('SELECT COUNT(*) FROM test');
54 $db->beginTransaction();
57 $db->rollBack();
61 $db->beginTransaction();
64 $db->commit();