Lines Matching refs:mysqli
2 mysqli->autocommit()
4 mysqli
20 if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) {
25 if (!is_bool($tmp = $mysqli->autocommit(true)))
28 if (!$mysqli->query('SET AUTOCOMMIT = 0'))
29 printf("[003] [%d] %s\n", $mysqli->errno, $mysqli->error);
31 if (!$res = $mysqli->query('SELECT @@autocommit as auto_commit'))
32 printf("[004] [%d] %s\n", $mysqli->errno, $mysqli->error);
39 if (true !== ($tmp = $mysqli->autocommit( true)))
42 if (!$res = $mysqli->query('SELECT @@autocommit as auto_commit'))
43 printf("[007] [%d] %s\n", $mysqli->errno, $mysqli->error);
49 if (!$mysqli->query('DROP TABLE IF EXISTS test'))
50 printf("[009] [%d] %s\n", $mysqli->errno, $mysqli->error);
52 if (!$mysqli->query('CREATE TABLE test(id INT) ENGINE = InnoDB')) {
53 printf("[010] Cannot create test table, [%d] %s\n", $mysqli->errno, $mysqli->error);
56 if (!$mysqli->query('INSERT INTO test(id) VALUES (1)'))
57 printf("[011] [%d] %s\n", $mysqli->errno, $mysqli->error);
59 if (!$mysqli->query('ROLLBACK'))
60 printf("[012] [%d] %s\n", $mysqli->errno, $mysqli->error);
62 if (!$res = $mysqli->query('SELECT COUNT(*) AS num FROM test'))
63 printf("[013] [%d] %s\n", $mysqli->errno, $mysqli->error);
67 $tmp['num'], $mysqli->errno, $mysqli->error);
71 if (!$mysqli->query('DROP TABLE IF EXISTS test'))
72 printf("[015] [%d] %s\n", $mysqli->errno, $mysqli->error);
74 if (!$mysqli->query('SET AUTOCOMMIT = 1'))
75 printf("[016] [%d] %s\n", $mysqli->errno, $mysqli->error);
77 if (!$res = $mysqli->query('SELECT @@autocommit as auto_commit'))
78 printf("[017] [%d] %s\n", $mysqli->errno, $mysqli->error);
85 if (true !== ($tmp = $mysqli->autocommit( false)))
88 if (!$mysqli->query('CREATE TABLE test(id INT) ENGINE = InnoDB')) {
89 printf("[020] Cannot create test table, [%d] %s\n", $mysqli->errno, $mysqli->error);
92 if (!$mysqli->query('INSERT INTO test(id) VALUES (1)'))
93 printf("[021] [%d] %s\n", $mysqli->errno, $mysqli->error);
95 if (!$mysqli->query('ROLLBACK'))
96 printf("[022] [%d] %s\n", $mysqli->errno, $mysqli->error);
98 if (!$res = $mysqli->query('SELECT COUNT(*) AS num FROM test'))
99 printf("[023] [%d] %s\n", $mysqli->errno, $mysqli->error);
105 if (!$mysqli->query('INSERT INTO test(id) VALUES (1)'))
106 printf("[025] [%d] %s\n", $mysqli->errno, $mysqli->error);
108 if (!$mysqli->query('COMMIT'))
109 printf("[025] [%d] %s\n", $mysqli->errno, $mysqli->error);
111 if (!$res = $mysqli->query('SELECT COUNT(*) AS num FROM test'))
112 printf("[027] [%d] %s\n", $mysqli->errno, $mysqli->error);
116 $tmp['num'], $mysqli->errno, $mysqli->error);
119 if (!$mysqli->query('DROP TABLE IF EXISTS test'))
120 printf("[029] [%d] %s\n", $mysqli->errno, $mysqli->error);
122 $mysqli->close();
125 $mysqli->autocommit(false);