Lines Matching refs:db

8 $db = MySQLPDOTest::factory();
9 $row = $db->query('SELECT VERSION() as _version')->fetch(PDO::FETCH_ASSOC);
25 $db = MySQLPDOTest::factory();
26 $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
28 MySQLPDOTest::createTestTable($db);
30 $stmt = $db->query('SELECT id FROM test');
38 function test_proc1($db) {
40 $stmt = $db->query('SELECT @VERSION as _version');
45 $db->exec('DROP PROCEDURE IF EXISTS p');
46 …$db->exec('CREATE PROCEDURE p(OUT ver_param VARCHAR(25)) BEGIN SELECT VERSION() INTO ver_param; EN…
47 $db->exec('CALL p(@VERSION)');
48 $stmt = $db->query('SELECT @VERSION as _version');
54 function test_proc2($db) {
56 $db->exec('DROP PROCEDURE IF EXISTS p');
57 …$db->exec('CREATE PROCEDURE p() BEGIN SELECT id FROM test ORDER BY id ASC LIMIT 3; SELECT id, labe…
58 $stmt = $db->query('CALL p()');
70 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 1);
72 $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 1);
73 test_proc1($db);
74 test_proc2($db);
76 $db = MySQLPDOTest::factory();
77 $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
78 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 1);
79 $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 0);
80 test_proc1($db);
81 test_proc2($db);
85 $db = MySQLPDOTest::factory();
86 $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
87 $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 1);
88 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0);
89 test_proc1($db);
90 test_proc2($db);
92 $db = MySQLPDOTest::factory();
93 $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
94 $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 0);
95 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0);
97 test_proc1($db);
98 test_proc2($db);
100 @$db->exec('DROP PROCEDURE IF EXISTS p');
104 $e->getMessage(), $db->errorCode(), implode(' ', $db->errorInfo()));