Lines Matching refs:mysqli
2 mysqli->affected_rows
4 mysqli
13 $mysqli = new mysqli();
15 $mysqli->affected_rows;
20 $mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
22 if (0 !== ($tmp = $mysqli->affected_rows))
25 if (!$mysqli->query('DROP TABLE IF EXISTS test'))
26 printf("[003] [%d] %s\n", $mysqli->errno, $mysqli->error);
28 …if (!$mysqli->query('CREATE TABLE test(id INT, label CHAR(1), PRIMARY KEY(id)) ENGINE = ' . $engin…
29 printf("[004] [%d] %s\n", $mysqli->errno, $mysqli->error);
31 if (!$mysqli->query("INSERT INTO test(id, label) VALUES (1, 'a')"))
32 printf("[005] [%d] %s\n", $mysqli->errno, $mysqli->error);
34 if (1 !== ($tmp = $mysqli->affected_rows))
38 $mysqli->query("INSERT INTO test(id, label) VALUES (1, 'a')");
39 if (-1 !== ($tmp = $mysqli->affected_rows))
42 … if (!$mysqli->query("INSERT INTO test(id, label) VALUES (1, 'a') ON DUPLICATE KEY UPDATE id = 4"))
43 printf("[008] [%d] %s\n", $mysqli->errno, $mysqli->error);
45 if (2 !== ($tmp = $mysqli->affected_rows))
48 if (!$mysqli->query("INSERT INTO test(id, label) VALUES (2, 'b'), (3, 'c')"))
49 printf("[010] [%d] %s\n", $mysqli->errno, $mysqli->error);
51 if (2 !== ($tmp = $mysqli->affected_rows))
54 if (!$mysqli->query("INSERT IGNORE INTO test(id, label) VALUES (1, 'a')")) {
55 printf("[012] [%d] %s\n", $mysqli->errno, $mysqli->error);
58 if (1 !== ($tmp = $mysqli->affected_rows))
61 if (!$mysqli->query("INSERT INTO test(id, label) SELECT id + 10, label FROM test"))
62 printf("[014] [%d] %s\n", $mysqli->errno, $mysqli->error);
64 if (4 !== ($tmp = $mysqli->affected_rows))
67 if (!$mysqli->query("REPLACE INTO test(id, label) values (4, 'd')"))
68 printf("[015] [%d] %s\n", $mysqli->errno, $mysqli->error);
70 if (2 !== ($tmp = $mysqli->affected_rows))
73 if (!$mysqli->query("REPLACE INTO test(id, label) values (5, 'e')"))
74 printf("[017] [%d] %s\n", $mysqli->errno, $mysqli->error);
76 if (1 !== ($tmp = $mysqli->affected_rows))
79 if (!$mysqli->query("UPDATE test SET label = 'a' WHERE id = 2"))
80 printf("[019] [%d] %s\n", $mysqli->errno, $mysqli->error);
82 if (1 !== ($tmp = $mysqli->affected_rows))
85 if (!$mysqli->query("UPDATE test SET label = 'a' WHERE id = 2")) {
86 printf("[021] [%d] %s\n", $mysqli->errno, $mysqli->error);
89 if (0 !== ($tmp = $mysqli->affected_rows))
92 if (!$mysqli->query("UPDATE test SET label = 'a' WHERE id = 100")) {
93 printf("[023] [%d] %s\n", $mysqli->errno, $mysqli->error);
96 if (0 !== ($tmp = $mysqli->affected_rows))
99 if (!$mysqli->query('DROP TABLE IF EXISTS test'))
100 printf("[025] [%d] %s\n", $mysqli->errno, $mysqli->error);
102 $mysqli->close();
105 $mysqli->affected_rows;