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)))
82 if (!($res = mysqli_query($link, sprintf("SHOW CHARACTER SET LIKE '%s'", $charset))))
85 if (true !== ($tmp = mysqli_set_charset($link, $charset)))
88 if (0 !== ($tmp = mysqli_affected_rows($link)))
92 if (!mysqli_query($link, "UPDATE test SET label = 'a' WHERE id = 2")) {
93 printf("[028] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
96 if (0 !== ($tmp = mysqli_affected_rows($link)))
99 if (!mysqli_query($link, "UPDATE test SET label = 'a' WHERE id = 100")) {
100 printf("[030] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
103 if (0 !== ($tmp = mysqli_affected_rows($link)))
106 if (!mysqli_query($link, 'DROP TABLE IF EXISTS test'))
107 printf("[032] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
110 mysqli_close($link);
113 mysqli_affected_rows($link);