Lines Matching refs:db
8 $db = MySQLPDOTest::factory();
13 $db = MySQLPDOTest::factory();
14 MySQLPDOTest::createTestTable($db);
34 function pdo_mysql_errorinfo($db, $offset) {
45 $code = $db->errorCode();
46 check_error($offset + 2, $db);
48 $stmt = $db->query('SELECT id, label FROM test');
50 check_error($offset + 3, $db);
53 $db->exec('DROP TABLE IF EXISTS test');
55 check_error($offset + 5, $db);
59 @$stmt = $db->query('SELECT id, label FROM unknown');
60 check_error($offset + 8, $db, '42S02');
62 MySQLPDOTest::createTestTable($db);
63 $stmt = $db->query('SELECT id, label FROM test');
64 check_error($offset + 9, $db);
67 $db2 = &$db;
68 $db->exec('DROP TABLE IF EXISTS unknown');
69 @$db->query('SELECT id, label FROM unknown');
70 check_error($offset + 11, $db, '42S02');
77 $tmp = @$db->getAttribute($invalid_attr);
78 check_error($offset + 15, $db, 'IM001');
85 $offset + 19, $e->getMessage(), $db->errorCode(), implode(' ', $db->errorInfo()));
89 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 1);
91 pdo_mysql_errorinfo($db, 0);
93 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0);
95 pdo_mysql_errorinfo($db, 20);