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…
27 $db->commit();
38 if (1 !== ($tmp = $db->getAttribute(PDO::ATTR_AUTOCOMMIT)))
42 if (true !== ($tmp = $db->beginTransaction()))
45 $db->exec("INSERT INTO test(id, label) VALUES (100, 'z')");
47 if (true !== ($tmp = $db->commit()))
49 $db->errorCode(), implode(' ', $db->errorInfo()));
52 $stmt = $db->query('SELECT id, label FROM test WHERE id = 100');
61 $db = MySQLPDOTest::factory();
62 MySQLPDOTest::createTestTable($db, 'MyISAM');
64 if (true !== ($tmp = $db->beginTransaction()))
67 $db->exec("INSERT INTO test(id, label) VALUES (100, 'z')");
68 if (true !== ($tmp = $db->commit()))
70 $db->errorCode(), implode(' ', $db->errorInfo()));
73 $stmt = $db->query('SELECT id, label FROM test WHERE id = 100');
83 $db->errorCode(), implode(' ', $db->errorInfo()));
90 $db = MySQLPDOTest::factory();
91 $db->exec('DROP TABLE IF EXISTS test_commit');
92 MySQLPDOTest::dropTestTable($db);