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');
34 function test_proc1($db) {
36 $stmt = $db->query('SELECT @VERSION as _version');
41 $db->exec('DROP PROCEDURE IF EXISTS p');
42 …$db->exec('CREATE PROCEDURE p(OUT ver_param VARCHAR(25)) BEGIN SELECT VERSION() INTO ver_param; EN…
43 $db->exec('CALL p(@VERSION)');
44 $stmt = $db->query('SELECT @VERSION as _version');
50 function test_proc2($db) {
52 $db->exec('DROP PROCEDURE IF EXISTS p');
53 …$db->exec('CREATE PROCEDURE p() BEGIN SELECT id FROM test ORDER BY id ASC LIMIT 3; SELECT id, labe…
54 $stmt = $db->query('CALL p()');
62 $stmt = $db->query('CALL p()');
71 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 1);
73 $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 1);
74 test_proc1($db);
75 test_proc2($db);
77 $db = MySQLPDOTest::factory();
78 $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
79 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 1);
80 $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 0);
81 test_proc1($db);
82 test_proc2($db);
86 $db = MySQLPDOTest::factory();
87 $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
88 $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 1);
89 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0);
90 test_proc1($db);
91 test_proc2($db);
93 $db = MySQLPDOTest::factory();
94 $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
95 $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 0);
96 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0);
98 test_proc1($db);
99 test_proc2($db);
101 @$db->exec('DROP PROCEDURE IF EXISTS p');
105 $e->getMessage(), $db->errorCode(), implode(' ', $db->errorInfo()));