Lines Matching refs:link
14 if (!$res = mysqli_query($link, "SELECT * FROM test ORDER BY id LIMIT 2")) {
15 printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
22 if (!$res = mysqli_query($link, "SELECT * FROM test ORDER BY id LIMIT 2")) {
23 printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
30 if (!$res = mysqli_query($link, "SELECT * FROM test ORDER BY id LIMIT 2")) {
31 printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
38 if (!$res = mysqli_query($link, "SELECT * FROM test ORDER BY id LIMIT 2")) {
39 printf("[009] [%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("[012] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
59 … if (!$res = mysqli_query($link, "SELECT 1 AS a, 2 AS a, 3 AS c, 4 AS C, NULL AS d, true AS e")) {
60 printf("[010] Cannot run query, [%d] %s\n", mysqli_errno($link), $mysqli_error($link));
66 if (!$res = mysqli_query($link, "SELECT 1 AS a, 2 AS b, 3 AS c, 4 AS C")) {
68 mysqli_errno($link), $mysqli_error($link));
80 …function func_mysqli_fetch_all($link, $engine, $sql_type, $sql_value, $php_value, $offset, $regexp…
82 if (!mysqli_query($link, "DROP TABLE IF EXISTS test")) {
83 printf("[%04d] [%d] %s\n", $offset, mysqli_errno($link), mysqli_error($link));
87 …if (!mysqli_query($link, $sql = sprintf("CREATE TABLE test(id INT NOT NULL, label %s, PRIMARY KEY(…
93 … if (!mysqli_query($link, $sql = sprintf("INSERT INTO test(id, label) VALUES (1, NULL)"))) {
94 printf("[%04d] [%d] %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link));
99 … if (!mysqli_query($link, $sql = "INSERT INTO test(id, label) VALUES (1, '" . $sql_value . "')")) {
100 … printf("[%04ds] [%d] %s - %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link), $sql);
104 …if (!mysqli_query($link, $sql = sprintf("INSERT INTO test(id, label) VALUES (1, '%d')", $sql_value…
105 … printf("[%04di] [%d] %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link));
111 if (!$res = mysqli_query($link, "SELECT id, label FROM test")) {
112 printf("[%04d] [%d] %s\n", $offset + 2, mysqli_errno($link), mysqli_error($link));
117 printf("[%04d] [%d] %s\n", $offset + 3, mysqli_errno($link), mysqli_error($link));
131 … gettype($row['label']), $row['label'], mysqli_errno($link), mysqli_error($link));
139 … gettype($row['label']), $row['label'], mysqli_errno($link), mysqli_error($link));
157 func_mysqli_fetch_all($link, $engine, "TINYINT", -11, "-11", 20);
158 func_mysqli_fetch_all($link, $engine, "TINYINT", NULL, NULL, 30);
159 func_mysqli_fetch_all($link, $engine, "TINYINT UNSIGNED", 1, "1", 40);
160 func_mysqli_fetch_all($link, $engine, "TINYINT UNSIGNED", NULL, NULL, 50);
162 func_mysqli_fetch_all($link, $engine, "BOOL", 1, "1", 60);
163 func_mysqli_fetch_all($link, $engine, "BOOL", NULL, NULL, 70);
164 func_mysqli_fetch_all($link, $engine, "BOOLEAN", 0, "0", 80);
165 func_mysqli_fetch_all($link, $engine, "BOOLEAN", NULL, NULL, 90);
167 func_mysqli_fetch_all($link, $engine, "SMALLINT", -32768, "-32768", 100);
168 func_mysqli_fetch_all($link, $engine, "SMALLINT", 32767, "32767", 110);
169 func_mysqli_fetch_all($link, $engine, "SMALLINT", NULL, NULL, 120);
170 func_mysqli_fetch_all($link, $engine, "SMALLINT UNSIGNED", 65535, "65535", 130);
171 func_mysqli_fetch_all($link, $engine, "SMALLINT UNSIGNED", NULL, NULL, 140);
173 func_mysqli_fetch_all($link, $engine, "MEDIUMINT", -8388608, "-8388608", 150);
174 func_mysqli_fetch_all($link, $engine, "MEDIUMINT", 8388607, "8388607", 160);
175 func_mysqli_fetch_all($link, $engine, "MEDIUMINT", NULL, NULL, 170);
176 func_mysqli_fetch_all($link, $engine, "MEDIUMINT UNSIGNED", 16777215, "16777215", 180);
177 func_mysqli_fetch_all($link, $engine, "MEDIUMINT UNSIGNED", NULL, NULL, 190);
179 func_mysqli_fetch_all($link, $engine, "INTEGER", -2147483648, "-2147483648", 200);
180 func_mysqli_fetch_all($link, $engine, "INTEGER", 2147483647, "2147483647", 210);
181 func_mysqli_fetch_all($link, $engine, "INTEGER", NULL, NULL, 220);
182 func_mysqli_fetch_all($link, $engine, "INTEGER UNSIGNED", "4294967295", "4294967295", 230);
183 func_mysqli_fetch_all($link, $engine, "INTEGER UNSIGNED", NULL, NULL, 240);
185 …func_mysqli_fetch_all($link, $engine, "BIGINT", "-9223372036854775808", "-9223372036854775808", 25…
187 func_mysqli_fetch_all($link, $engine, "BIGINT", NULL, NULL, 260);
188 …func_mysqli_fetch_all($link, $engine, "BIGINT UNSIGNED", "18446744073709551615", "1844674407370955…
189 func_mysqli_fetch_all($link, $engine, "BIGINT UNSIGNED", NULL, NULL, 280);
191 …func_mysqli_fetch_all($link, $engine, "FLOAT", (string)(-9223372036854775808 - 1.1), "-9.22337e+18…
192 func_mysqli_fetch_all($link, $engine, "FLOAT", NULL, NULL, 300);
193 …func_mysqli_fetch_all($link, $engine, "FLOAT UNSIGNED", (string)(18446744073709551615 + 1.1), "1.8…
194 func_mysqli_fetch_all($link, $engine, "FLOAT UNSIGNED ", NULL, NULL, 320);
196 func_mysqli_fetch_all($link, $engine, "DOUBLE(10,2)", "-99999999.99", "-99999999.99", 330);
197 func_mysqli_fetch_all($link, $engine, "DOUBLE(10,2)", NULL, NULL, 340);
198 … func_mysqli_fetch_all($link, $engine, "DOUBLE(10,2) UNSIGNED", "99999999.99", "99999999.99", 350);
199 func_mysqli_fetch_all($link, $engine, "DOUBLE(10,2) UNSIGNED", NULL, NULL, 360);
201 func_mysqli_fetch_all($link, $engine, "DECIMAL(10,2)", "-99999999.99", "-99999999.99", 370);
202 func_mysqli_fetch_all($link, $engine, "DECIMAL(10,2)", NULL, NULL, 380);
203 func_mysqli_fetch_all($link, $engine, "DECIMAL(10,2)", "99999999.99", "99999999.99", 390);
204 func_mysqli_fetch_all($link, $engine, "DECIMAL(10,2)", NULL, NULL, 400);
207 func_mysqli_fetch_all($link, $engine, "DATE", @date('Y-m-d'), @date('Y-m-d'), 410);
208 func_mysqli_fetch_all($link, $engine, "DATE NOT NULL", @date('Y-m-d'), @date('Y-m-d'), 420);
209 func_mysqli_fetch_all($link, $engine, "DATE", NULL, NULL, 430);
211 …func_mysqli_fetch_all($link, $engine, "DATETIME", @date('Y-m-d H:i:s'), @date('Y-m-d H:i:s'), 440);
212 …func_mysqli_fetch_all($link, $engine, "DATETIME NOT NULL", @date('Y-m-d H:i:s'), @date('Y-m-d H:i:…
213 func_mysqli_fetch_all($link, $engine, "DATETIME", NULL, NULL, 460);
215 …func_mysqli_fetch_all($link, $engine, "TIMESTAMP", @date('Y-m-d H:i:s'), @date('Y-m-d H:i:s'), 470…
217 func_mysqli_fetch_all($link, $engine, "TIME", @date('H:i:s'), @date('H:i:s'), 480);
218 func_mysqli_fetch_all($link, $engine, "TIME NOT NULL", @date('H:i:s'), @date('H:i:s'), 490);
219 func_mysqli_fetch_all($link, $engine, "TIME", NULL, NULL, 500);
221 func_mysqli_fetch_all($link, $engine, "YEAR", @date('Y'), @date('Y'), 510);
222 func_mysqli_fetch_all($link, $engine, "YEAR NOT NULL", @date('Y'), @date('Y'), 520);
223 func_mysqli_fetch_all($link, $engine, "YEAR", NULL, NULL, 530);
226 func_mysqli_fetch_all($link, $engine, "CHAR(1)", "a", "a", 540);
227 func_mysqli_fetch_all($link, $engine, "CHAR(255)", $string255, $string255, 550);
228 func_mysqli_fetch_all($link, $engine, "CHAR(1) NOT NULL", "a", "a", 560);
229 func_mysqli_fetch_all($link, $engine, "CHAR(1)", NULL, NULL, 570);
232 func_mysqli_fetch_all($link, $engine, "VARCHAR(1)", "a", "a", 580);
233 func_mysqli_fetch_all($link, $engine, "VARCHAR(255)", $string255, $string255, 590);
234 func_mysqli_fetch_all($link, $engine, "VARCHAR(65400)", $string65k, $string65k, 600);
235 func_mysqli_fetch_all($link, $engine, "VARCHAR(1) NOT NULL", "a", "a", 610);
236 func_mysqli_fetch_all($link, $engine, "VARCHAR(1)", NULL, NULL, 620);
238 func_mysqli_fetch_all($link, $engine, "BINARY(1)", "a", "a", 630);
239 func_mysqli_fetch_all($link, $engine, "BINARY(2)", chr(0) . "a", chr(0) . "a", 640);
240 func_mysqli_fetch_all($link, $engine, "BINARY(1) NOT NULL", "b", "b", 650);
241 func_mysqli_fetch_all($link, $engine, "BINARY(1)", NULL, NULL, 660);
243 func_mysqli_fetch_all($link, $engine, "VARBINARY(1)", "a", "a", 670);
244 func_mysqli_fetch_all($link, $engine, "VARBINARY(2)", chr(0) . "a", chr(0) . "a", 680);
245 func_mysqli_fetch_all($link, $engine, "VARBINARY(1) NOT NULL", "b", "b", 690);
246 func_mysqli_fetch_all($link, $engine, "VARBINARY(1)", NULL, NULL, 700);
248 func_mysqli_fetch_all($link, $engine, "TINYBLOB", "a", "a", 710);
249 func_mysqli_fetch_all($link, $engine, "TINYBLOB", chr(0) . "a", chr(0) . "a", 720);
250 func_mysqli_fetch_all($link, $engine, "TINYBLOB NOT NULL", "b", "b", 730);
251 func_mysqli_fetch_all($link, $engine, "TINYBLOB", NULL, NULL, 740);
253 func_mysqli_fetch_all($link, $engine, "TINYTEXT", "a", "a", 750);
254 func_mysqli_fetch_all($link, $engine, "TINYTEXT NOT NULL", "a", "a", 760);
255 func_mysqli_fetch_all($link, $engine, "TINYTEXT", NULL, NULL, 770);
257 func_mysqli_fetch_all($link, $engine, "BLOB", "a", "a", 780);
258 func_mysqli_fetch_all($link, $engine, "BLOB", chr(0) . "a", chr(0) . "a", 780);
259 func_mysqli_fetch_all($link, $engine, "BLOB", NULL, NULL, 790);
261 func_mysqli_fetch_all($link, $engine, "TEXT", "a", "a", 800);
262 func_mysqli_fetch_all($link, $engine, "TEXT", chr(0) . "a", chr(0) . "a", 810);
263 func_mysqli_fetch_all($link, $engine, "TEXT", NULL, NULL, 820);
265 func_mysqli_fetch_all($link, $engine, "MEDIUMBLOB", "a", "a", 830);
266 func_mysqli_fetch_all($link, $engine, "MEDIUMBLOB", chr(0) . "a", chr(0) . "a", 840);
267 func_mysqli_fetch_all($link, $engine, "MEDIUMBLOB", NULL, NULL, 850);
269 func_mysqli_fetch_all($link, $engine, "MEDIUMTEXT", "a", "a", 860);
270 func_mysqli_fetch_all($link, $engine, "MEDIUMTEXT", chr(0) . "a", chr(0) . "a", 870);
271 func_mysqli_fetch_all($link, $engine, "MEDIUMTEXT", NULL, NULL, 880);
273 func_mysqli_fetch_all($link, $engine, "LONGBLOB", "a", "a", 890);
274 func_mysqli_fetch_all($link, $engine, "LONGTEXT", chr(0) . "a", chr(0) . "a", 900);
275 func_mysqli_fetch_all($link, $engine, "LONGBLOB", NULL, NULL, 910);
277 func_mysqli_fetch_all($link, $engine, "ENUM('a', 'b')", "a", "a", 920);
278 func_mysqli_fetch_all($link, $engine, "ENUM('a', 'b')", NULL, NULL, 930);
280 func_mysqli_fetch_all($link, $engine, "SET('a', 'b')", "a", "a", 940);
281 func_mysqli_fetch_all($link, $engine, "SET('a', 'b')", NULL, NULL, 950);
283 mysqli_close($link);
291 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
296 if (!$res = mysqli_real_query($link, "SELECT 1 AS _one"))
297 printf("[017] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
300 if (!is_object($res = mysqli_use_result($link)))
302 gettype($res), $res, mysqli_errno($link), mysqli_error($link));