Lines Matching refs:link
14 $link = NULL;
19 if (!is_null($tmp = @mysqli_affected_rows($link)))
22 if (!is_null($tmp = @mysqli_affected_rows($link, $link)))
25 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
29 if (0 !== ($tmp = mysqli_affected_rows($link)))
31 gettype($tmp), $tmp, mysqli_errno($link), mysqli_error($link));
33 if (!mysqli_query($link, 'DROP TABLE IF EXISTS test'))
34 printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
36 …if (!mysqli_query($link, 'CREATE TABLE test(id INT, label CHAR(1), PRIMARY KEY(id)) ENGINE = ' . $…
37 printf("[007] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
39 if (!mysqli_query($link, "INSERT INTO test(id, label) VALUES (1, 'a')"))
40 printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
42 if (1 !== ($tmp = mysqli_affected_rows($link)))
46 mysqli_query($link, "INSERT INTO test(id, label) VALUES (1, 'a')");
47 if (-1 !== ($tmp = mysqli_affected_rows($link)))
50 …if (!mysqli_query($link, "INSERT INTO test(id, label) VALUES (1, 'a') ON DUPLICATE KEY UPDATE id =…
51 printf("[012] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
53 if (2 !== ($tmp = mysqli_affected_rows($link)))
56 if (!mysqli_query($link, "INSERT INTO test(id, label) VALUES (2, 'b'), (3, 'c')"))
57 printf("[014] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
59 if (2 !== ($tmp = mysqli_affected_rows($link)))
62 if (!mysqli_query($link, "INSERT IGNORE INTO test(id, label) VALUES (1, 'a')")) {
63 printf("[016] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
66 if (1 !== ($tmp = mysqli_affected_rows($link)))
69 if (!mysqli_query($link, "INSERT INTO test(id, label) SELECT id + 10, label FROM test"))
70 printf("[018] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
72 if (4 !== ($tmp = mysqli_affected_rows($link)))
75 if (!mysqli_query($link, "REPLACE INTO test(id, label) values (4, 'd')"))
76 printf("[020] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
78 if (2 !== ($tmp = mysqli_affected_rows($link)))
81 if (!mysqli_query($link, "REPLACE INTO test(id, label) values (5, 'e')"))
82 printf("[022] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
84 if (1 !== ($tmp = mysqli_affected_rows($link)))
87 if (!mysqli_query($link, "UPDATE test SET label = 'a' WHERE id = 2"))
88 printf("[024] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
90 if (1 !== ($tmp = mysqli_affected_rows($link)))
95 if (!($res = mysqli_query($link, sprintf("SHOW CHARACTER SET LIKE '%s'", $charset))))
98 if (true !== ($tmp = mysqli_set_charset($link, $charset)))
101 if (0 !== ($tmp = mysqli_affected_rows($link)))
105 if (!mysqli_query($link, "UPDATE test SET label = 'a' WHERE id = 2")) {
106 printf("[028] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
109 if (0 !== ($tmp = mysqli_affected_rows($link)))
112 if (!mysqli_query($link, "UPDATE test SET label = 'a' WHERE id = 100")) {
113 printf("[030] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
116 if (0 !== ($tmp = mysqli_affected_rows($link)))
119 if (!mysqli_query($link, 'DROP TABLE IF EXISTS test'))
120 printf("[032] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
123 mysqli_close($link);
125 if (NULL !== ($tmp = @mysqli_affected_rows($link)))