Lines Matching refs:db
9 $db = MySQLPDOTest::factory();
14 $db = MySQLPDOTest::factory();
15 MySQLPDOTest::createTestTable($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 test');
51 check_error($offset + 3, $db);
54 $db->exec('DROP TABLE IF EXISTS test');
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($db);
64 $stmt = $db->query('SELECT id, label FROM test');
65 check_error($offset + 9, $db);
68 $db2 = &$db;
69 $db->exec('DROP TABLE IF EXISTS unknown');
70 @$db->query('SELECT id, label FROM 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);