Lines Matching refs:db
9 $db = MySQLPDOTest::factory();
10 $row = $db->query('SELECT VERSION() as _version')->fetch(PDO::FETCH_ASSOC);
26 $db = MySQLPDOTest::factory();
27 $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
29 MySQLPDOTest::createTestTable($db);
31 $stmt = $db->query('SELECT id FROM test');
35 function test_proc1($db) {
37 $stmt = $db->query('SELECT @VERSION as _version');
42 $db->exec('DROP PROCEDURE IF EXISTS p');
43 …$db->exec('CREATE PROCEDURE p(OUT ver_param VARCHAR(25)) BEGIN SELECT VERSION() INTO ver_param; EN…
44 $db->exec('CALL p(@VERSION)');
45 $stmt = $db->query('SELECT @VERSION as _version');
51 function test_proc2($db) {
53 $db->exec('DROP PROCEDURE IF EXISTS p');
54 …$db->exec('CREATE PROCEDURE p() BEGIN SELECT id FROM test ORDER BY id ASC LIMIT 3; SELECT id, labe…
55 $stmt = $db->query('CALL p()');
63 $stmt = $db->query('CALL p()');
72 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 1);
74 $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 1);
75 test_proc1($db);
76 test_proc2($db);
78 $db = MySQLPDOTest::factory();
79 $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
80 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 1);
81 $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 0);
82 test_proc1($db);
83 test_proc2($db);
87 $db = MySQLPDOTest::factory();
88 $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
89 $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 1);
90 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0);
91 test_proc1($db);
92 test_proc2($db);
94 $db = MySQLPDOTest::factory();
95 $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
96 $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 0);
97 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0);
99 test_proc1($db);
100 test_proc2($db);
102 @$db->exec('DROP PROCEDURE IF EXISTS p');
106 $e->getMessage(), $db->errorCode(), implode(' ', $db->errorInfo()));