Lines Matching refs:link
16 $link = NULL;
21 if (!is_null($tmp = @mysqli_fetch_all($link)))
25 if (!$res = mysqli_query($link, "SELECT * FROM test ORDER BY id LIMIT 2")) {
26 printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
33 if (!$res = mysqli_query($link, "SELECT * FROM test ORDER BY id LIMIT 2")) {
34 printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
41 if (!$res = mysqli_query($link, "SELECT * FROM test ORDER BY id LIMIT 2")) {
42 printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
49 if (!$res = mysqli_query($link, "SELECT * FROM test ORDER BY id LIMIT 2")) {
50 printf("[009] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
60 if (!$res = mysqli_query($link, "SELECT * FROM test ORDER BY id LIMIT 2")) {
61 printf("[012] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
70 if (!$res = mysqli_query($link, "SELECT 1 AS a, 2 AS a, 3 AS c, 4 AS C, NULL AS d, true AS e")) {
71 printf("[010] Cannot run query, [%d] %s\n", mysqli_errno($link), $mysqli_error($link));
77 if (!$res = mysqli_query($link, "SELECT 1 AS a, 2 AS b, 3 AS c, 4 AS C")) {
79 mysqli_errno($link), $mysqli_error($link));
90 gettype($tmp), $tmp, mysqli_errno($link), mysqli_error($link));
94 …function func_mysqli_fetch_all($link, $engine, $sql_type, $sql_value, $php_value, $offset, $regexp…
96 if (!mysqli_query($link, "DROP TABLE IF EXISTS test")) {
97 printf("[%04d] [%d] %s\n", $offset, mysqli_errno($link), mysqli_error($link));
101 …if (!mysqli_query($link, $sql = sprintf("CREATE TABLE test(id INT NOT NULL, label %s, PRIMARY KEY(…
107 if (!mysqli_query($link, $sql = sprintf("INSERT INTO test(id, label) VALUES (1, NULL)"))) {
108 printf("[%04d] [%d] %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link));
113 … if (!mysqli_query($link, $sql = "INSERT INTO test(id, label) VALUES (1, '" . $sql_value . "')")) {
114 printf("[%04ds] [%d] %s - %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link), $sql);
118 …if (!mysqli_query($link, $sql = sprintf("INSERT INTO test(id, label) VALUES (1, '%d')", $sql_value…
119 printf("[%04di] [%d] %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link));
125 if (!$res = mysqli_query($link, "SELECT id, label FROM test")) {
126 printf("[%04d] [%d] %s\n", $offset + 2, mysqli_errno($link), mysqli_error($link));
131 printf("[%04d] [%d] %s\n", $offset + 3, mysqli_errno($link), mysqli_error($link));
145 gettype($row['label']), $row['label'], mysqli_errno($link), mysqli_error($link));
153 gettype($row['label']), $row['label'], mysqli_errno($link), mysqli_error($link));
171 func_mysqli_fetch_all($link, $engine, "TINYINT", -11, "-11", 20);
172 func_mysqli_fetch_all($link, $engine, "TINYINT", NULL, NULL, 30);
173 func_mysqli_fetch_all($link, $engine, "TINYINT UNSIGNED", 1, "1", 40);
174 func_mysqli_fetch_all($link, $engine, "TINYINT UNSIGNED", NULL, NULL, 50);
176 func_mysqli_fetch_all($link, $engine, "BOOL", 1, "1", 60);
177 func_mysqli_fetch_all($link, $engine, "BOOL", NULL, NULL, 70);
178 func_mysqli_fetch_all($link, $engine, "BOOLEAN", 0, "0", 80);
179 func_mysqli_fetch_all($link, $engine, "BOOLEAN", NULL, NULL, 90);
181 func_mysqli_fetch_all($link, $engine, "SMALLINT", -32768, "-32768", 100);
182 func_mysqli_fetch_all($link, $engine, "SMALLINT", 32767, "32767", 110);
183 func_mysqli_fetch_all($link, $engine, "SMALLINT", NULL, NULL, 120);
184 func_mysqli_fetch_all($link, $engine, "SMALLINT UNSIGNED", 65535, "65535", 130);
185 func_mysqli_fetch_all($link, $engine, "SMALLINT UNSIGNED", NULL, NULL, 140);
187 func_mysqli_fetch_all($link, $engine, "MEDIUMINT", -8388608, "-8388608", 150);
188 func_mysqli_fetch_all($link, $engine, "MEDIUMINT", 8388607, "8388607", 160);
189 func_mysqli_fetch_all($link, $engine, "MEDIUMINT", NULL, NULL, 170);
190 func_mysqli_fetch_all($link, $engine, "MEDIUMINT UNSIGNED", 16777215, "16777215", 180);
191 func_mysqli_fetch_all($link, $engine, "MEDIUMINT UNSIGNED", NULL, NULL, 190);
193 func_mysqli_fetch_all($link, $engine, "INTEGER", -2147483648, "-2147483648", 200);
194 func_mysqli_fetch_all($link, $engine, "INTEGER", 2147483647, "2147483647", 210);
195 func_mysqli_fetch_all($link, $engine, "INTEGER", NULL, NULL, 220);
196 func_mysqli_fetch_all($link, $engine, "INTEGER UNSIGNED", "4294967295", "4294967295", 230);
197 func_mysqli_fetch_all($link, $engine, "INTEGER UNSIGNED", NULL, NULL, 240);
199 …func_mysqli_fetch_all($link, $engine, "BIGINT", "-9223372036854775808", "-9223372036854775808", 25…
201 func_mysqli_fetch_all($link, $engine, "BIGINT", NULL, NULL, 260);
202 …func_mysqli_fetch_all($link, $engine, "BIGINT UNSIGNED", "18446744073709551615", "1844674407370955…
203 func_mysqli_fetch_all($link, $engine, "BIGINT UNSIGNED", NULL, NULL, 280);
205 …func_mysqli_fetch_all($link, $engine, "FLOAT", (string)(-9223372036854775808 - 1.1), "-9.22337e+18…
206 func_mysqli_fetch_all($link, $engine, "FLOAT", NULL, NULL, 300);
207 …func_mysqli_fetch_all($link, $engine, "FLOAT UNSIGNED", (string)(18446744073709551615 + 1.1), "1.8…
208 func_mysqli_fetch_all($link, $engine, "FLOAT UNSIGNED ", NULL, NULL, 320);
210 func_mysqli_fetch_all($link, $engine, "DOUBLE(10,2)", "-99999999.99", "-99999999.99", 330);
211 func_mysqli_fetch_all($link, $engine, "DOUBLE(10,2)", NULL, NULL, 340);
212 func_mysqli_fetch_all($link, $engine, "DOUBLE(10,2) UNSIGNED", "99999999.99", "99999999.99", 350);
213 func_mysqli_fetch_all($link, $engine, "DOUBLE(10,2) UNSIGNED", NULL, NULL, 360);
215 func_mysqli_fetch_all($link, $engine, "DECIMAL(10,2)", "-99999999.99", "-99999999.99", 370);
216 func_mysqli_fetch_all($link, $engine, "DECIMAL(10,2)", NULL, NULL, 380);
217 func_mysqli_fetch_all($link, $engine, "DECIMAL(10,2)", "99999999.99", "99999999.99", 390);
218 func_mysqli_fetch_all($link, $engine, "DECIMAL(10,2)", NULL, NULL, 400);
221 func_mysqli_fetch_all($link, $engine, "DATE", @date('Y-m-d'), @date('Y-m-d'), 410);
222 func_mysqli_fetch_all($link, $engine, "DATE NOT NULL", @date('Y-m-d'), @date('Y-m-d'), 420);
223 func_mysqli_fetch_all($link, $engine, "DATE", NULL, NULL, 430);
225 func_mysqli_fetch_all($link, $engine, "DATETIME", @date('Y-m-d H:i:s'), @date('Y-m-d H:i:s'), 440);
226 …func_mysqli_fetch_all($link, $engine, "DATETIME NOT NULL", @date('Y-m-d H:i:s'), @date('Y-m-d H:i:…
227 func_mysqli_fetch_all($link, $engine, "DATETIME", NULL, NULL, 460);
229 …func_mysqli_fetch_all($link, $engine, "TIMESTAMP", @date('Y-m-d H:i:s'), @date('Y-m-d H:i:s'), 470…
231 func_mysqli_fetch_all($link, $engine, "TIME", @date('H:i:s'), @date('H:i:s'), 480);
232 func_mysqli_fetch_all($link, $engine, "TIME NOT NULL", @date('H:i:s'), @date('H:i:s'), 490);
233 func_mysqli_fetch_all($link, $engine, "TIME", NULL, NULL, 500);
235 func_mysqli_fetch_all($link, $engine, "YEAR", @date('Y'), @date('Y'), 510);
236 func_mysqli_fetch_all($link, $engine, "YEAR NOT NULL", @date('Y'), @date('Y'), 520);
237 func_mysqli_fetch_all($link, $engine, "YEAR", NULL, NULL, 530);
240 func_mysqli_fetch_all($link, $engine, "CHAR(1)", "a", "a", 540);
241 func_mysqli_fetch_all($link, $engine, "CHAR(255)", $string255, $string255, 550);
242 func_mysqli_fetch_all($link, $engine, "CHAR(1) NOT NULL", "a", "a", 560);
243 func_mysqli_fetch_all($link, $engine, "CHAR(1)", NULL, NULL, 570);
246 func_mysqli_fetch_all($link, $engine, "VARCHAR(1)", "a", "a", 580);
247 func_mysqli_fetch_all($link, $engine, "VARCHAR(255)", $string255, $string255, 590);
248 func_mysqli_fetch_all($link, $engine, "VARCHAR(65400)", $string65k, $string65k, 600);
249 func_mysqli_fetch_all($link, $engine, "VARCHAR(1) NOT NULL", "a", "a", 610);
250 func_mysqli_fetch_all($link, $engine, "VARCHAR(1)", NULL, NULL, 620);
252 func_mysqli_fetch_all($link, $engine, "BINARY(1)", "a", "a", 630);
253 func_mysqli_fetch_all($link, $engine, "BINARY(2)", chr(0) . "a", chr(0) . "a", 640);
254 func_mysqli_fetch_all($link, $engine, "BINARY(1) NOT NULL", "b", "b", 650);
255 func_mysqli_fetch_all($link, $engine, "BINARY(1)", NULL, NULL, 660);
257 func_mysqli_fetch_all($link, $engine, "VARBINARY(1)", "a", "a", 670);
258 func_mysqli_fetch_all($link, $engine, "VARBINARY(2)", chr(0) . "a", chr(0) . "a", 680);
259 func_mysqli_fetch_all($link, $engine, "VARBINARY(1) NOT NULL", "b", "b", 690);
260 func_mysqli_fetch_all($link, $engine, "VARBINARY(1)", NULL, NULL, 700);
262 func_mysqli_fetch_all($link, $engine, "TINYBLOB", "a", "a", 710);
263 func_mysqli_fetch_all($link, $engine, "TINYBLOB", chr(0) . "a", chr(0) . "a", 720);
264 func_mysqli_fetch_all($link, $engine, "TINYBLOB NOT NULL", "b", "b", 730);
265 func_mysqli_fetch_all($link, $engine, "TINYBLOB", NULL, NULL, 740);
267 func_mysqli_fetch_all($link, $engine, "TINYTEXT", "a", "a", 750);
268 func_mysqli_fetch_all($link, $engine, "TINYTEXT NOT NULL", "a", "a", 760);
269 func_mysqli_fetch_all($link, $engine, "TINYTEXT", NULL, NULL, 770);
271 func_mysqli_fetch_all($link, $engine, "BLOB", "a", "a", 780);
272 func_mysqli_fetch_all($link, $engine, "BLOB", chr(0) . "a", chr(0) . "a", 780);
273 func_mysqli_fetch_all($link, $engine, "BLOB", NULL, NULL, 790);
275 func_mysqli_fetch_all($link, $engine, "TEXT", "a", "a", 800);
276 func_mysqli_fetch_all($link, $engine, "TEXT", chr(0) . "a", chr(0) . "a", 810);
277 func_mysqli_fetch_all($link, $engine, "TEXT", NULL, NULL, 820);
279 func_mysqli_fetch_all($link, $engine, "MEDIUMBLOB", "a", "a", 830);
280 func_mysqli_fetch_all($link, $engine, "MEDIUMBLOB", chr(0) . "a", chr(0) . "a", 840);
281 func_mysqli_fetch_all($link, $engine, "MEDIUMBLOB", NULL, NULL, 850);
283 func_mysqli_fetch_all($link, $engine, "MEDIUMTEXT", "a", "a", 860);
284 func_mysqli_fetch_all($link, $engine, "MEDIUMTEXT", chr(0) . "a", chr(0) . "a", 870);
285 func_mysqli_fetch_all($link, $engine, "MEDIUMTEXT", NULL, NULL, 880);
287 func_mysqli_fetch_all($link, $engine, "LONGBLOB", "a", "a", 890);
288 func_mysqli_fetch_all($link, $engine, "LONGTEXT", chr(0) . "a", chr(0) . "a", 900);
289 func_mysqli_fetch_all($link, $engine, "LONGBLOB", NULL, NULL, 910);
291 func_mysqli_fetch_all($link, $engine, "ENUM('a', 'b')", "a", "a", 920);
292 func_mysqli_fetch_all($link, $engine, "ENUM('a', 'b')", NULL, NULL, 930);
294 func_mysqli_fetch_all($link, $engine, "SET('a', 'b')", "a", "a", 940);
295 func_mysqli_fetch_all($link, $engine, "SET('a', 'b')", NULL, NULL, 950);
297 mysqli_close($link);
302 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
307 if (!$res = mysqli_real_query($link, "SELECT 1 AS _one"))
308 printf("[017] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
311 if (!is_object($res = mysqli_use_result($link)))
313 gettype($res), $res, mysqli_errno($link), mysqli_error($link));