Lines Matching refs:db
8 $db = MySQLPDOTest::factory();
9 if (false == MySQLPDOTest::detect_transactional_mysql_engine($db))
15 $db = MySQLPDOTest::factory();
16 MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db));
19 if (true !== ($tmp = $db->beginTransaction())) {
24 $db->exec(sprintf('DROP TABLE IF EXISTS test_commit'));
25 …$db->exec(sprintf('CREATE TABLE test_commit(id INT) ENGINE=%s', MySQLPDOTest::detect_transactional…
26 if (true !== ($tmp = $db->commit())) {
28 $db->errorCode(), implode(' ', $db->errorInfo()));
33 if (1 !== ($tmp = $db->getAttribute(PDO::ATTR_AUTOCOMMIT)))
37 if (true !== ($tmp = $db->beginTransaction()))
40 $db->exec("INSERT INTO test(id, label) VALUES (100, 'z')");
42 if (true !== ($tmp = $db->commit()))
44 $db->errorCode(), implode(' ', $db->errorInfo()));
47 $stmt = $db->query('SELECT id, label FROM test WHERE id = 100');
56 $db = MySQLPDOTest::factory();
57 MySQLPDOTest::createTestTable($db, 'MyISAM');
59 if (true !== ($tmp = $db->beginTransaction()))
62 $db->exec("INSERT INTO test(id, label) VALUES (100, 'z')");
63 if (true !== ($tmp = $db->commit()))
65 $db->errorCode(), implode(' ', $db->errorInfo()));
68 $stmt = $db->query('SELECT id, label FROM test WHERE id = 100');
78 $db->errorCode(), implode(' ', $db->errorInfo()));
85 $db = MySQLPDOTest::factory();
86 $db->exec('DROP TABLE IF EXISTS test_commit');
87 MySQLPDOTest::dropTestTable($db);