Lines Matching refs:db

15 $db = MySQLPDOTest::factory();
16 $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
17 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
18 $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
20 $db->query('DROP TABLE IF EXISTS test');
21 $db->query('CREATE TABLE test (first int) ENGINE = InnoDB');
22 $res = $db->query('INSERT INTO test(first) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12…
25 $stmt = $db->prepare('DELETE FROM test WHERE first=1');
29 $res = $db->query('DELETE FROM test WHERE first=2');
32 $stmt2 = $db->prepare('DELETE FROM test WHERE first=3');
38 $stmt3 = $db->prepare('DELETE FROM test WHERE first=4');
42 $stmt = $db->prepare('SELECT first FROM test WHERE first=5');
46 $db->exec('DROP PROCEDURE IF EXISTS nores');
47 $db->exec('CREATE PROCEDURE nores() BEGIN DELETE FROM test WHERE first=6; END;');
48 $stmt4 = $db->prepare('CALL nores()');
51 $db->exec('DROP PROCEDURE IF EXISTS nores');
53 $db->exec('DROP PROCEDURE IF EXISTS ret');
54 $db->exec('CREATE PROCEDURE ret() BEGIN SELECT first FROM test WHERE first=7; END;');
55 $stmt5 = $db->prepare('CALL ret()');
60 $db->exec('DROP PROCEDURE IF EXISTS ret');
64 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
66 $stmt = $db->prepare('DELETE FROM test WHERE first=8');
70 $res = $db->query('DELETE FROM test WHERE first=9');
73 $stmt2 = $db->prepare('DELETE FROM test WHERE first=10');
79 $stmt3 = $db->prepare('DELETE FROM test WHERE first=11');
83 $stmt = $db->prepare('SELECT first FROM test WHERE first=12');
87 $db->exec('DROP PROCEDURE IF EXISTS nores');
88 $db->exec('CREATE PROCEDURE nores() BEGIN DELETE FROM test WHERE first=13; END;');
89 $stmt4 = $db->prepare('CALL nores()');
92 $db->exec('DROP PROCEDURE IF EXISTS nores');
94 $db->exec('DROP PROCEDURE IF EXISTS ret');
95 $db->exec('CREATE PROCEDURE ret() BEGIN SELECT first FROM test WHERE first=14; END;');
96 $stmt5 = $db->prepare('CALL ret()');
101 $db->exec('DROP PROCEDURE IF EXISTS ret');
103 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
104 $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);
106 $stmt = $db->prepare('DELETE FROM test WHERE first=15');
110 $stmt = $db->prepare('SELECT first FROM test WHERE first=16');