Lines Matching refs:db

14 $db = MySQLPDOTest::factory();
15 $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
16 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
18 $db->query('DROP TABLE IF EXISTS test');
19 $db->query('CREATE TABLE test (first int) ENGINE = InnoDB');
20 $res = $db->query('INSERT INTO test(first) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12…
23 $stmt = $db->prepare('DELETE FROM test WHERE first=1');
27 $res = $db->query('DELETE FROM test WHERE first=2');
30 $stmt2 = $db->prepare('DELETE FROM test WHERE first=3');
36 $stmt3 = $db->prepare('DELETE FROM test WHERE first=4');
40 $stmt = $db->prepare('SELECT first FROM test WHERE first=5');
44 $db->exec('DROP PROCEDURE IF EXISTS nores');
45 $db->exec('CREATE PROCEDURE nores() BEGIN DELETE FROM test WHERE first=6; END;');
46 $stmt4 = $db->prepare('CALL nores()');
49 $db->exec('DROP PROCEDURE IF EXISTS nores');
51 $db->exec('DROP PROCEDURE IF EXISTS ret');
52 $db->exec('CREATE PROCEDURE ret() BEGIN SELECT first FROM test WHERE first=7; END;');
53 $stmt5 = $db->prepare('CALL ret()');
58 $db->exec('DROP PROCEDURE IF EXISTS ret');
62 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
64 $stmt = $db->prepare('DELETE FROM test WHERE first=8');
68 $res = $db->query('DELETE FROM test WHERE first=9');
71 $stmt2 = $db->prepare('DELETE FROM test WHERE first=10');
77 $stmt3 = $db->prepare('DELETE FROM test WHERE first=11');
81 $stmt = $db->prepare('SELECT first FROM test WHERE first=12');
85 $db->exec('DROP PROCEDURE IF EXISTS nores');
86 $db->exec('CREATE PROCEDURE nores() BEGIN DELETE FROM test WHERE first=13; END;');
87 $stmt4 = $db->prepare('CALL nores()');
90 $db->exec('DROP PROCEDURE IF EXISTS nores');
92 $db->exec('DROP PROCEDURE IF EXISTS ret');
93 $db->exec('CREATE PROCEDURE ret() BEGIN SELECT first FROM test WHERE first=14; END;');
94 $stmt5 = $db->prepare('CALL ret()');
99 $db->exec('DROP PROCEDURE IF EXISTS ret');
101 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
102 $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);
104 $stmt = $db->prepare('DELETE FROM test WHERE first=15');
108 $stmt = $db->prepare('SELECT first FROM test WHERE first=16');