Lines Matching refs:db
9 $db = MySQLPDOTest::factory();
10 if (false == MySQLPDOTest::detect_transactional_mysql_engine($db))
16 $db = MySQLPDOTest::factory();
17 MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db));
20 if (true !== ($tmp = $db->beginTransaction())) {
25 $db->exec(sprintf('DROP TABLE IF EXISTS test_commit'));
26 …$db->exec(sprintf('CREATE TABLE test_commit(id INT) ENGINE=%s', MySQLPDOTest::detect_transactional…
28 $db->commit();
39 if (1 !== ($tmp = $db->getAttribute(PDO::ATTR_AUTOCOMMIT)))
43 if (true !== ($tmp = $db->beginTransaction()))
46 $db->exec("INSERT INTO test(id, label) VALUES (100, 'z')");
48 if (true !== ($tmp = $db->commit()))
50 $db->errorCode(), implode(' ', $db->errorInfo()));
53 $stmt = $db->query('SELECT id, label FROM test WHERE id = 100');
62 $db = MySQLPDOTest::factory();
63 MySQLPDOTest::createTestTable($db, 'MyISAM');
65 if (true !== ($tmp = $db->beginTransaction()))
68 $db->exec("INSERT INTO test(id, label) VALUES (100, 'z')");
69 if (true !== ($tmp = $db->commit()))
71 $db->errorCode(), implode(' ', $db->errorInfo()));
74 $stmt = $db->query('SELECT id, label FROM test WHERE id = 100');
84 $db->errorCode(), implode(' ', $db->errorInfo()));
91 $db = MySQLPDOTest::factory();
92 $db->exec('DROP TABLE IF EXISTS test_commit');
93 MySQLPDOTest::dropTestTable($db);