Lines Matching refs:db

12     function exec_and_count($offset, &$db, $sql, $exp, $suppress_warning = false) {
17 $ret = @$db->exec($sql);
19 $ret = $db->exec($sql);
24 $db->errorCode(), implode(' ', $db->errorInfo()));
30 $offset, $sql, $db->errorCode(), implode(' ', $db->errorInfo()));
38 $db = MySQLPDOTest::factory();
39 MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db));
44 @$db->exec('DROP DATABASE IF EXISTS pdo_exec_ddl');
45 @$db->exec('DROP DATABASE IF EXISTS pdo_exec_ddl2');
46 if (1 === @$db->exec('CREATE DATABASE pdo_exec_ddl')) {
48 exec_and_count(3, $db, 'ALTER DATABASE pdo_exec_ddl CHARACTER SET latin1', 1);
51 exec_and_count(4, $db, 'DROP TABLE IF EXISTS pdo_exec_ddl', 0);
52 exec_and_count(5, $db, 'DROP TABLE IF EXISTS pdo_exec_ddl2', 0);
53 if (0 === $db->exec('CREATE TABLE pdo_exec_ddl(id INT, col1 CHAR(2))')) {
54 exec_and_count(5, $db, 'CREATE INDEX idx1 ON pdo_exec_ddl(id)', 0);
55 exec_and_count(6, $db, 'DROP INDEX idx1 ON pdo_exec_ddl', 0);
56 exec_and_count(7, $db, 'ALTER TABLE pdo_exec_ddl DROP id', 0);
57 exec_and_count(8, $db, 'ALTER TABLE pdo_exec_ddl ADD id INT', 0);
58 exec_and_count(9, $db, 'ALTER TABLE pdo_exec_ddl ALTER id SET DEFAULT 1', 0);
59 exec_and_count(10, $db, 'RENAME TABLE pdo_exec_ddl TO pdo_exec_ddl2', 0);
77 $db->errorCode(), implode(' ', $db->errorInfo()));
84 $db = MySQLPDOTest::factory();
85 MySQLPDOTest::dropTestTable($db);
87 @$db->exec('DROP TABLE IF EXISTS pdo_exec_ddl');
88 @$db->exec('DROP TABLE IF EXISTS pdo_exec_ddl2');
89 @$db->exec('DROP DATABASE IF EXISTS pdo_exec_ddl');
90 @$db->exec('DROP DATABASE IF EXISTS pdo_exec_ddl2');