Lines Matching refs:mysqli

2 mysqli->autocommit()
23 if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) {
28 if (!is_bool($tmp = $mysqli->autocommit(true)))
31 if (!$mysqli->query('SET AUTOCOMMIT = 0'))
32 printf("[003] [%d] %s\n", $mysqli->errno, $mysqli->error);
34 if (!$res = $mysqli->query('SELECT @@autocommit as auto_commit'))
35 printf("[004] [%d] %s\n", $mysqli->errno, $mysqli->error);
42 if (true !== ($tmp = $mysqli->autocommit( true)))
45 if (!$res = $mysqli->query('SELECT @@autocommit as auto_commit'))
46 printf("[007] [%d] %s\n", $mysqli->errno, $mysqli->error);
52 if (!$mysqli->query('DROP TABLE IF EXISTS test'))
53 printf("[009] [%d] %s\n", $mysqli->errno, $mysqli->error);
55 if (!$mysqli->query('CREATE TABLE test(id INT) ENGINE = InnoDB')) {
56 printf("[010] Cannot create test table, [%d] %s\n", $mysqli->errno, $mysqli->error);
59 if (!$mysqli->query('INSERT INTO test(id) VALUES (1)'))
60 printf("[011] [%d] %s\n", $mysqli->errno, $mysqli->error);
62 if (!$mysqli->query('ROLLBACK'))
63 printf("[012] [%d] %s\n", $mysqli->errno, $mysqli->error);
65 if (!$res = $mysqli->query('SELECT COUNT(*) AS num FROM test'))
66 printf("[013] [%d] %s\n", $mysqli->errno, $mysqli->error);
70 $tmp['num'], $mysqli->errno, $mysqli->error);
74 if (!$mysqli->query('DROP TABLE IF EXISTS test'))
75 printf("[015] [%d] %s\n", $mysqli->errno, $mysqli->error);
77 if (!$mysqli->query('SET AUTOCOMMIT = 1'))
78 printf("[016] [%d] %s\n", $mysqli->errno, $mysqli->error);
80 if (!$res = $mysqli->query('SELECT @@autocommit as auto_commit'))
81 printf("[017] [%d] %s\n", $mysqli->errno, $mysqli->error);
88 if (true !== ($tmp = $mysqli->autocommit( false)))
91 if (!$mysqli->query('CREATE TABLE test(id INT) ENGINE = InnoDB')) {
92 printf("[020] Cannot create test table, [%d] %s\n", $mysqli->errno, $mysqli->error);
95 if (!$mysqli->query('INSERT INTO test(id) VALUES (1)'))
96 printf("[021] [%d] %s\n", $mysqli->errno, $mysqli->error);
98 if (!$mysqli->query('ROLLBACK'))
99 printf("[022] [%d] %s\n", $mysqli->errno, $mysqli->error);
101 if (!$res = $mysqli->query('SELECT COUNT(*) AS num FROM test'))
102 printf("[023] [%d] %s\n", $mysqli->errno, $mysqli->error);
108 if (!$mysqli->query('INSERT INTO test(id) VALUES (1)'))
109 printf("[025] [%d] %s\n", $mysqli->errno, $mysqli->error);
111 if (!$mysqli->query('COMMIT'))
112 printf("[025] [%d] %s\n", $mysqli->errno, $mysqli->error);
114 if (!$res = $mysqli->query('SELECT COUNT(*) AS num FROM test'))
115 printf("[027] [%d] %s\n", $mysqli->errno, $mysqli->error);
119 $tmp['num'], $mysqli->errno, $mysqli->error);
122 if (!$mysqli->query('DROP TABLE IF EXISTS test'))
123 printf("[029] [%d] %s\n", $mysqli->errno, $mysqli->error);
125 $mysqli->close();
127 if (NULL !== ($tmp = @$mysqli->autocommit( false)))