Lines Matching refs:db
10 $db = MySQLPDOTest::factory();
11 $row = $db->query('SELECT VERSION() as _version')->fetch(PDO::FETCH_ASSOC);
27 $db = MySQLPDOTest::factory();
28 $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
30 MySQLPDOTest::createTestTable($db);
32 $stmt = $db->query('SELECT id FROM test');
40 function test_proc1($db) {
42 $stmt = $db->query('SELECT @VERSION as _version');
47 $db->exec('DROP PROCEDURE IF EXISTS p');
48 …$db->exec('CREATE PROCEDURE p(OUT ver_param VARCHAR(25)) BEGIN SELECT VERSION() INTO ver_param; EN…
49 $db->exec('CALL p(@VERSION)');
50 $stmt = $db->query('SELECT @VERSION as _version');
56 function test_proc2($db) {
58 $db->exec('DROP PROCEDURE IF EXISTS p');
59 …$db->exec('CREATE PROCEDURE p() BEGIN SELECT id FROM test ORDER BY id ASC LIMIT 3; SELECT id, labe…
60 $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()));