Lines Matching refs:db
14 $db = MySQLPDOTest::factory();
15 $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
20 MySQLPDOTest::createTestTable($table, $db);
22 $stmt = $db->query("SELECT id FROM {$table}");
26 function test_proc1($db) {
29 $stmt = $db->query('SELECT @VERSION as _version');
34 $db->exec("DROP PROCEDURE IF EXISTS {$procedure}");
35 …$db->exec("CREATE PROCEDURE {$procedure}(OUT ver_param VARCHAR(25)) BEGIN SELECT VERSION() INTO ve…
36 $db->exec("CALL {$procedure}(@VERSION)");
37 $stmt = $db->query('SELECT @VERSION as _version');
42 function test_proc2($db) {
46 $db->exec("DROP PROCEDURE IF EXISTS {$procedure}");
47 …$db->exec("CREATE PROCEDURE {$procedure}() BEGIN SELECT id FROM {$table} ORDER BY id ASC LIMIT 3; …
48 $stmt = $db->query("CALL {$procedure}()");
56 $stmt = $db->query("CALL {$procedure}()");
64 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 1);
66 $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 1);
67 test_proc1($db);
68 test_proc2($db);
70 $db = MySQLPDOTest::factory();
71 $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
72 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 1);
73 $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 0);
74 test_proc1($db);
75 test_proc2($db);
79 $db = MySQLPDOTest::factory();
80 $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
81 $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 1);
82 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0);
83 test_proc1($db);
84 test_proc2($db);
86 $db = MySQLPDOTest::factory();
87 $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
88 $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 0);
89 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0);
91 test_proc1($db);
92 test_proc2($db);
95 $e->getMessage(), $db->errorCode(), implode(' ', $db->errorInfo()));
103 $db = MySQLPDOTest::factory();
104 $db->exec('DROP TABLE IF EXISTS pdo_mysql_stmt_nextrowset');
105 $db->exec('DROP PROCEDURE IF EXISTS pdo_mysql_stmt_nextrowset_p');