Lines Matching refs:mysqli
2 mysqli->autocommit()
4 mysqli
20 $mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
22 if (!is_bool($tmp = $mysqli->autocommit(true)))
25 if (!$mysqli->query('SET AUTOCOMMIT = 0'))
26 printf("[003] [%d] %s\n", $mysqli->errno, $mysqli->error);
28 if (!$res = $mysqli->query('SELECT @@autocommit as auto_commit'))
29 printf("[004] [%d] %s\n", $mysqli->errno, $mysqli->error);
36 if (true !== ($tmp = $mysqli->autocommit( true)))
39 if (!$res = $mysqli->query('SELECT @@autocommit as auto_commit'))
40 printf("[007] [%d] %s\n", $mysqli->errno, $mysqli->error);
46 if (!$mysqli->query('DROP TABLE IF EXISTS test'))
47 printf("[009] [%d] %s\n", $mysqli->errno, $mysqli->error);
49 if (!$mysqli->query('CREATE TABLE test(id INT) ENGINE = InnoDB')) {
50 printf("[010] Cannot create test table, [%d] %s\n", $mysqli->errno, $mysqli->error);
53 if (!$mysqli->query('INSERT INTO test(id) VALUES (1)'))
54 printf("[011] [%d] %s\n", $mysqli->errno, $mysqli->error);
56 if (!$mysqli->query('ROLLBACK'))
57 printf("[012] [%d] %s\n", $mysqli->errno, $mysqli->error);
59 if (!$res = $mysqli->query('SELECT COUNT(*) AS num FROM test'))
60 printf("[013] [%d] %s\n", $mysqli->errno, $mysqli->error);
64 $tmp['num'], $mysqli->errno, $mysqli->error);
68 if (!$mysqli->query('DROP TABLE IF EXISTS test'))
69 printf("[015] [%d] %s\n", $mysqli->errno, $mysqli->error);
71 if (!$mysqli->query('SET AUTOCOMMIT = 1'))
72 printf("[016] [%d] %s\n", $mysqli->errno, $mysqli->error);
74 if (!$res = $mysqli->query('SELECT @@autocommit as auto_commit'))
75 printf("[017] [%d] %s\n", $mysqli->errno, $mysqli->error);
82 if (true !== ($tmp = $mysqli->autocommit( false)))
85 if (!$mysqli->query('CREATE TABLE test(id INT) ENGINE = InnoDB')) {
86 printf("[020] Cannot create test table, [%d] %s\n", $mysqli->errno, $mysqli->error);
89 if (!$mysqli->query('INSERT INTO test(id) VALUES (1)'))
90 printf("[021] [%d] %s\n", $mysqli->errno, $mysqli->error);
92 if (!$mysqli->query('ROLLBACK'))
93 printf("[022] [%d] %s\n", $mysqli->errno, $mysqli->error);
95 if (!$res = $mysqli->query('SELECT COUNT(*) AS num FROM test'))
96 printf("[023] [%d] %s\n", $mysqli->errno, $mysqli->error);
102 if (!$mysqli->query('INSERT INTO test(id) VALUES (1)'))
103 printf("[025] [%d] %s\n", $mysqli->errno, $mysqli->error);
105 if (!$mysqli->query('COMMIT'))
106 printf("[025] [%d] %s\n", $mysqli->errno, $mysqli->error);
108 if (!$res = $mysqli->query('SELECT COUNT(*) AS num FROM test'))
109 printf("[027] [%d] %s\n", $mysqli->errno, $mysqli->error);
113 $tmp['num'], $mysqli->errno, $mysqli->error);
116 if (!$mysqli->query('DROP TABLE IF EXISTS test'))
117 printf("[029] [%d] %s\n", $mysqli->errno, $mysqli->error);
119 $mysqli->close();
122 $mysqli->autocommit(false);