Lines Matching refs:link
13 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
17 if (0 !== ($tmp = mysqli_affected_rows($link)))
19 gettype($tmp), $tmp, mysqli_errno($link), mysqli_error($link));
21 if (!mysqli_query($link, 'DROP TABLE IF EXISTS test'))
22 printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
24 …if (!mysqli_query($link, 'CREATE TABLE test(id INT, label CHAR(1), PRIMARY KEY(id)) ENGINE = ' . $…
25 printf("[007] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
27 if (!mysqli_query($link, "INSERT INTO test(id, label) VALUES (1, 'a')"))
28 printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
30 if (1 !== ($tmp = mysqli_affected_rows($link)))
34 mysqli_query($link, "INSERT INTO test(id, label) VALUES (1, 'a')");
35 if (-1 !== ($tmp = mysqli_affected_rows($link)))
38 …if (!mysqli_query($link, "INSERT INTO test(id, label) VALUES (1, 'a') ON DUPLICATE KEY UPDATE id =…
39 printf("[012] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
41 if (2 !== ($tmp = mysqli_affected_rows($link)))
44 if (!mysqli_query($link, "INSERT INTO test(id, label) VALUES (2, 'b'), (3, 'c')"))
45 printf("[014] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
47 if (2 !== ($tmp = mysqli_affected_rows($link)))
50 if (!mysqli_query($link, "INSERT IGNORE INTO test(id, label) VALUES (1, 'a')")) {
51 printf("[016] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
54 if (1 !== ($tmp = mysqli_affected_rows($link)))
57 if (!mysqli_query($link, "INSERT INTO test(id, label) SELECT id + 10, label FROM test"))
58 printf("[018] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
60 if (4 !== ($tmp = mysqli_affected_rows($link)))
63 if (!mysqli_query($link, "REPLACE INTO test(id, label) values (4, 'd')"))
64 printf("[020] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
66 if (2 !== ($tmp = mysqli_affected_rows($link)))
69 if (!mysqli_query($link, "REPLACE INTO test(id, label) values (5, 'e')"))
70 printf("[022] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
72 if (1 !== ($tmp = mysqli_affected_rows($link)))
75 if (!mysqli_query($link, "UPDATE test SET label = 'a' WHERE id = 2"))
76 printf("[024] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
78 if (1 !== ($tmp = mysqli_affected_rows($link)))
83 if (!($res = mysqli_query($link, sprintf("SHOW CHARACTER SET LIKE '%s'", $charset))))
86 if (true !== ($tmp = mysqli_set_charset($link, $charset)))
89 if (0 !== ($tmp = mysqli_affected_rows($link)))
93 if (!mysqli_query($link, "UPDATE test SET label = 'a' WHERE id = 2")) {
94 printf("[028] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
97 if (0 !== ($tmp = mysqli_affected_rows($link)))
100 if (!mysqli_query($link, "UPDATE test SET label = 'a' WHERE id = 100")) {
101 printf("[030] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
104 if (0 !== ($tmp = mysqli_affected_rows($link)))
107 if (!mysqli_query($link, 'DROP TABLE IF EXISTS test'))
108 printf("[032] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
111 mysqli_close($link);
114 mysqli_affected_rows($link);