Lines Matching refs:db
13 $db = MySQLPDOTest::factory();
16 MySQLPDOTest::createTestTable($table, $db);
35 function pdo_mysql_errorinfo($db, $offset) {
46 $code = $db->errorCode();
47 check_error($offset + 2, $db);
49 $stmt = $db->query("SELECT id, label FROM {$table}");
51 check_error($offset + 3, $db);
54 $db->exec("DROP TABLE IF EXISTS {$table}");
56 check_error($offset + 5, $db);
60 @$stmt = $db->query('SELECT id, label FROM unknown');
61 check_error($offset + 8, $db, '42S02');
63 MySQLPDOTest::createTestTable($table, $db);
64 $stmt = $db->query("SELECT id, label FROM {$table}");
65 check_error($offset + 9, $db);
68 $db2 = &$db;
69 $db->exec('DROP TABLE IF EXISTS pdo_mysql_errorinfo_unknown');
70 @$db->query('SELECT id, label FROM pdo_mysql_errorinfo_unknown');
71 check_error($offset + 11, $db, '42S02');
78 $tmp = @$db->getAttribute($invalid_attr);
79 check_error($offset + 15, $db, 'IM001');
86 $offset + 19, $e->getMessage(), $db->errorCode(), implode(' ', $db->errorInfo()));
90 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 1);
92 pdo_mysql_errorinfo($db, 0);
94 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0);
96 pdo_mysql_errorinfo($db, 20);
103 $db = MySQLPDOTest::factory();
104 $db->query('DROP TABLE IF EXISTS pdo_mysql_errorinfo');