mysqli_fetch_all.phpt 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460
  1. --TEST--
  2. mysqli_fetch_all()
  3. --SKIPIF--
  4. <?php
  5. require_once('skipif.inc');
  6. require_once('skipifemb.inc');
  7. require_once('skipifconnectfailure.inc');
  8. if (!function_exists('mysqli_fetch_all'))
  9. die("skip: function only available with mysqlnd");
  10. ?>
  11. --FILE--
  12. <?php
  13. require_once("connect.inc");
  14. $tmp = NULL;
  15. $link = NULL;
  16. if (!is_null($tmp = @mysqli_fetch_all()))
  17. printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
  18. if (!is_null($tmp = @mysqli_fetch_all($link)))
  19. printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
  20. require('table.inc');
  21. if (!$res = mysqli_query($link, "SELECT * FROM test ORDER BY id LIMIT 2")) {
  22. printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
  23. }
  24. print "[005]\n";
  25. var_dump(mysqli_fetch_all($res));
  26. mysqli_free_result($res);
  27. if (!$res = mysqli_query($link, "SELECT * FROM test ORDER BY id LIMIT 2")) {
  28. printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
  29. }
  30. print "[007]\n";
  31. var_dump(mysqli_fetch_all($res, MYSQLI_NUM));
  32. mysqli_free_result($res);
  33. if (!$res = mysqli_query($link, "SELECT * FROM test ORDER BY id LIMIT 2")) {
  34. printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
  35. }
  36. print "[008]\n";
  37. var_dump(mysqli_fetch_all($res, MYSQLI_BOTH));
  38. mysqli_free_result($res);
  39. if (!$res = mysqli_query($link, "SELECT * FROM test ORDER BY id LIMIT 2")) {
  40. printf("[009] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
  41. }
  42. print "[010]\n";
  43. var_dump(mysqli_fetch_all($res, MYSQLI_ASSOC));
  44. print "[011]\n";
  45. var_dump(mysqli_fetch_all($res));
  46. mysqli_free_result($res);
  47. if (!$res = mysqli_query($link, "SELECT * FROM test ORDER BY id LIMIT 2")) {
  48. printf("[012] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
  49. }
  50. print "[013]\n";
  51. var_dump(mysqli_fetch_all($res, MYSQLI_ASSOC));
  52. print "[016]\n";
  53. var_dump(mysqli_fetch_all($res));
  54. if (!$res = mysqli_query($link, "SELECT 1 AS a, 2 AS a, 3 AS c, 4 AS C, NULL AS d, true AS e")) {
  55. printf("[010] Cannot run query, [%d] %s\n", mysqli_errno($link), $mysqli_error($link));
  56. }
  57. print "[017]\n";
  58. var_dump(mysqli_fetch_all($res, MYSQLI_BOTH));
  59. mysqli_free_result($res);
  60. if (!$res = mysqli_query($link, "SELECT 1 AS a, 2 AS b, 3 AS c, 4 AS C")) {
  61. printf("[018] Cannot run query, [%d] %s\n",
  62. mysqli_errno($link), $mysqli_error($link));
  63. exit(1);
  64. }
  65. do {
  66. $illegal_mode = mt_rand(-10000, 10000);
  67. } while (in_array($illegal_mode, array(MYSQLI_ASSOC, MYSQLI_NUM, MYSQLI_BOTH)));
  68. // NOTE: for BC reasons with ext/mysql, ext/mysqli accepts invalid result modes.
  69. $tmp = mysqli_fetch_all($res, $illegal_mode);
  70. if (false !== $tmp)
  71. printf("[019] Expecting boolean/false although, got %s/%s. [%d] %s\n",
  72. gettype($tmp), $tmp, mysqli_errno($link), mysqli_error($link));
  73. mysqli_free_result($res);
  74. function func_mysqli_fetch_all($link, $engine, $sql_type, $sql_value, $php_value, $offset, $regexp_comparison = NULL) {
  75. if (!mysqli_query($link, "DROP TABLE IF EXISTS test")) {
  76. printf("[%04d] [%d] %s\n", $offset, mysqli_errno($link), mysqli_error($link));
  77. return false;
  78. }
  79. if (!mysqli_query($link, $sql = sprintf("CREATE TABLE test(id INT NOT NULL, label %s, PRIMARY KEY(id)) ENGINE = %s", $sql_type, $engine))) {
  80. // don't bail, engine might not support the datatype
  81. return false;
  82. }
  83. if (is_null($php_value)) {
  84. if (!mysqli_query($link, $sql = sprintf("INSERT INTO test(id, label) VALUES (1, NULL)"))) {
  85. printf("[%04d] [%d] %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link));
  86. return false;
  87. }
  88. } else {
  89. if (is_string($sql_value)) {
  90. if (!mysqli_query($link, $sql = "INSERT INTO test(id, label) VALUES (1, '" . $sql_value . "')")) {
  91. printf("[%04ds] [%d] %s - %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link), $sql);
  92. return false;
  93. }
  94. } else {
  95. if (!mysqli_query($link, $sql = sprintf("INSERT INTO test(id, label) VALUES (1, '%d')", $sql_value))) {
  96. printf("[%04di] [%d] %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link));
  97. return false;
  98. }
  99. }
  100. }
  101. if (!$res = mysqli_query($link, "SELECT id, label FROM test")) {
  102. printf("[%04d] [%d] %s\n", $offset + 2, mysqli_errno($link), mysqli_error($link));
  103. return false;
  104. }
  105. if (!$tmp = mysqli_fetch_all($res, MYSQLI_BOTH)) {
  106. printf("[%04d] [%d] %s\n", $offset + 3, mysqli_errno($link), mysqli_error($link));
  107. return false;
  108. }
  109. $row = $tmp[0];
  110. $fields = mysqli_fetch_fields($res);
  111. if (!(gettype($php_value)=="unicode" && ($fields[1]->flags & 128))) {
  112. if ($regexp_comparison) {
  113. if (!preg_match($regexp_comparison, (string)$row['label']) || !preg_match($regexp_comparison, (string)$row[1])) {
  114. printf("[%04d] Expecting %s/%s [reg exp = %s], got %s/%s resp. %s/%s. [%d] %s\n", $offset + 4,
  115. gettype($php_value), $php_value, $regexp_comparison,
  116. gettype($row[1]), $row[1],
  117. gettype($row['label']), $row['label'], mysqli_errno($link), mysqli_error($link));
  118. return false;
  119. }
  120. } else {
  121. if (($row['label'] !== $php_value) || ($row[1] != $php_value)) {
  122. printf("[%04d] Expecting %s/%s, got %s/%s resp. %s/%s. [%d] %s\n", $offset + 4,
  123. gettype($php_value), $php_value,
  124. gettype($row[1]), $row[1],
  125. gettype($row['label']), $row['label'], mysqli_errno($link), mysqli_error($link));
  126. return false;
  127. }
  128. }
  129. }
  130. return true;
  131. }
  132. function func_mysqli_fetch_array_make_string($len) {
  133. $ret = '';
  134. for ($i = 0; $i < $len; $i++)
  135. $ret .= chr(mt_rand(65, 90));
  136. return $ret;
  137. }
  138. func_mysqli_fetch_all($link, $engine, "TINYINT", -11, "-11", 20);
  139. func_mysqli_fetch_all($link, $engine, "TINYINT", NULL, NULL, 30);
  140. func_mysqli_fetch_all($link, $engine, "TINYINT UNSIGNED", 1, "1", 40);
  141. func_mysqli_fetch_all($link, $engine, "TINYINT UNSIGNED", NULL, NULL, 50);
  142. func_mysqli_fetch_all($link, $engine, "BOOL", 1, "1", 60);
  143. func_mysqli_fetch_all($link, $engine, "BOOL", NULL, NULL, 70);
  144. func_mysqli_fetch_all($link, $engine, "BOOLEAN", 0, "0", 80);
  145. func_mysqli_fetch_all($link, $engine, "BOOLEAN", NULL, NULL, 90);
  146. func_mysqli_fetch_all($link, $engine, "SMALLINT", -32768, "-32768", 100);
  147. func_mysqli_fetch_all($link, $engine, "SMALLINT", 32767, "32767", 110);
  148. func_mysqli_fetch_all($link, $engine, "SMALLINT", NULL, NULL, 120);
  149. func_mysqli_fetch_all($link, $engine, "SMALLINT UNSIGNED", 65535, "65535", 130);
  150. func_mysqli_fetch_all($link, $engine, "SMALLINT UNSIGNED", NULL, NULL, 140);
  151. func_mysqli_fetch_all($link, $engine, "MEDIUMINT", -8388608, "-8388608", 150);
  152. func_mysqli_fetch_all($link, $engine, "MEDIUMINT", 8388607, "8388607", 160);
  153. func_mysqli_fetch_all($link, $engine, "MEDIUMINT", NULL, NULL, 170);
  154. func_mysqli_fetch_all($link, $engine, "MEDIUMINT UNSIGNED", 16777215, "16777215", 180);
  155. func_mysqli_fetch_all($link, $engine, "MEDIUMINT UNSIGNED", NULL, NULL, 190);
  156. func_mysqli_fetch_all($link, $engine, "INTEGER", -2147483648, "-2147483648", 200);
  157. func_mysqli_fetch_all($link, $engine, "INTEGER", 2147483647, "2147483647", 210);
  158. func_mysqli_fetch_all($link, $engine, "INTEGER", NULL, NULL, 220);
  159. func_mysqli_fetch_all($link, $engine, "INTEGER UNSIGNED", "4294967295", "4294967295", 230);
  160. func_mysqli_fetch_all($link, $engine, "INTEGER UNSIGNED", NULL, NULL, 240);
  161. func_mysqli_fetch_all($link, $engine, "BIGINT", "-9223372036854775808", "-9223372036854775808", 250);
  162. func_mysqli_fetch_all($link, $engine, "BIGINT", NULL, NULL, 260);
  163. func_mysqli_fetch_all($link, $engine, "BIGINT UNSIGNED", "18446744073709551615", "18446744073709551615", 270);
  164. func_mysqli_fetch_all($link, $engine, "BIGINT UNSIGNED", NULL, NULL, 280);
  165. func_mysqli_fetch_all($link, $engine, "FLOAT", (string)(-9223372036854775808 - 1.1), "-9.22337e+18", 290, "/-9\.22337e\+?[0]?18/iu");
  166. func_mysqli_fetch_all($link, $engine, "FLOAT", NULL, NULL, 300);
  167. func_mysqli_fetch_all($link, $engine, "FLOAT UNSIGNED", (string)(18446744073709551615 + 1.1), "1.84467e+19", 310, "/1\.84467e\+?[0]?19/iu");
  168. func_mysqli_fetch_all($link, $engine, "FLOAT UNSIGNED ", NULL, NULL, 320);
  169. func_mysqli_fetch_all($link, $engine, "DOUBLE(10,2)", "-99999999.99", "-99999999.99", 330);
  170. func_mysqli_fetch_all($link, $engine, "DOUBLE(10,2)", NULL, NULL, 340);
  171. func_mysqli_fetch_all($link, $engine, "DOUBLE(10,2) UNSIGNED", "99999999.99", "99999999.99", 350);
  172. func_mysqli_fetch_all($link, $engine, "DOUBLE(10,2) UNSIGNED", NULL, NULL, 360);
  173. func_mysqli_fetch_all($link, $engine, "DECIMAL(10,2)", "-99999999.99", "-99999999.99", 370);
  174. func_mysqli_fetch_all($link, $engine, "DECIMAL(10,2)", NULL, NULL, 380);
  175. func_mysqli_fetch_all($link, $engine, "DECIMAL(10,2)", "99999999.99", "99999999.99", 390);
  176. func_mysqli_fetch_all($link, $engine, "DECIMAL(10,2)", NULL, NULL, 400);
  177. // don't care about date() strict TZ warnings...
  178. func_mysqli_fetch_all($link, $engine, "DATE", @date('Y-m-d'), @date('Y-m-d'), 410);
  179. func_mysqli_fetch_all($link, $engine, "DATE NOT NULL", @date('Y-m-d'), @date('Y-m-d'), 420);
  180. func_mysqli_fetch_all($link, $engine, "DATE", NULL, NULL, 430);
  181. func_mysqli_fetch_all($link, $engine, "DATETIME", @date('Y-m-d H:i:s'), @date('Y-m-d H:i:s'), 440);
  182. func_mysqli_fetch_all($link, $engine, "DATETIME NOT NULL", @date('Y-m-d H:i:s'), @date('Y-m-d H:i:s'), 450);
  183. func_mysqli_fetch_all($link, $engine, "DATETIME", NULL, NULL, 460);
  184. func_mysqli_fetch_all($link, $engine, "TIMESTAMP", @date('Y-m-d H:i:s'), @date('Y-m-d H:i:s'), 470);
  185. func_mysqli_fetch_all($link, $engine, "TIME", @date('H:i:s'), @date('H:i:s'), 480);
  186. func_mysqli_fetch_all($link, $engine, "TIME NOT NULL", @date('H:i:s'), @date('H:i:s'), 490);
  187. func_mysqli_fetch_all($link, $engine, "TIME", NULL, NULL, 500);
  188. func_mysqli_fetch_all($link, $engine, "YEAR", @date('Y'), @date('Y'), 510);
  189. func_mysqli_fetch_all($link, $engine, "YEAR NOT NULL", @date('Y'), @date('Y'), 520);
  190. func_mysqli_fetch_all($link, $engine, "YEAR", NULL, NULL, 530);
  191. $string255 = func_mysqli_fetch_array_make_string(255);
  192. func_mysqli_fetch_all($link, $engine, "CHAR(1)", "a", "a", 540);
  193. func_mysqli_fetch_all($link, $engine, "CHAR(255)", $string255, $string255, 550);
  194. func_mysqli_fetch_all($link, $engine, "CHAR(1) NOT NULL", "a", "a", 560);
  195. func_mysqli_fetch_all($link, $engine, "CHAR(1)", NULL, NULL, 570);
  196. $string65k = func_mysqli_fetch_array_make_string(65400);
  197. func_mysqli_fetch_all($link, $engine, "VARCHAR(1)", "a", "a", 580);
  198. func_mysqli_fetch_all($link, $engine, "VARCHAR(255)", $string255, $string255, 590);
  199. func_mysqli_fetch_all($link, $engine, "VARCHAR(65400)", $string65k, $string65k, 600);
  200. func_mysqli_fetch_all($link, $engine, "VARCHAR(1) NOT NULL", "a", "a", 610);
  201. func_mysqli_fetch_all($link, $engine, "VARCHAR(1)", NULL, NULL, 620);
  202. func_mysqli_fetch_all($link, $engine, "BINARY(1)", "a", "a", 630);
  203. func_mysqli_fetch_all($link, $engine, "BINARY(2)", chr(0) . "a", chr(0) . "a", 640);
  204. func_mysqli_fetch_all($link, $engine, "BINARY(1) NOT NULL", "b", "b", 650);
  205. func_mysqli_fetch_all($link, $engine, "BINARY(1)", NULL, NULL, 660);
  206. func_mysqli_fetch_all($link, $engine, "VARBINARY(1)", "a", "a", 670);
  207. func_mysqli_fetch_all($link, $engine, "VARBINARY(2)", chr(0) . "a", chr(0) . "a", 680);
  208. func_mysqli_fetch_all($link, $engine, "VARBINARY(1) NOT NULL", "b", "b", 690);
  209. func_mysqli_fetch_all($link, $engine, "VARBINARY(1)", NULL, NULL, 700);
  210. func_mysqli_fetch_all($link, $engine, "TINYBLOB", "a", "a", 710);
  211. func_mysqli_fetch_all($link, $engine, "TINYBLOB", chr(0) . "a", chr(0) . "a", 720);
  212. func_mysqli_fetch_all($link, $engine, "TINYBLOB NOT NULL", "b", "b", 730);
  213. func_mysqli_fetch_all($link, $engine, "TINYBLOB", NULL, NULL, 740);
  214. func_mysqli_fetch_all($link, $engine, "TINYTEXT", "a", "a", 750);
  215. func_mysqli_fetch_all($link, $engine, "TINYTEXT NOT NULL", "a", "a", 760);
  216. func_mysqli_fetch_all($link, $engine, "TINYTEXT", NULL, NULL, 770);
  217. func_mysqli_fetch_all($link, $engine, "BLOB", "a", "a", 780);
  218. func_mysqli_fetch_all($link, $engine, "BLOB", chr(0) . "a", chr(0) . "a", 780);
  219. func_mysqli_fetch_all($link, $engine, "BLOB", NULL, NULL, 790);
  220. func_mysqli_fetch_all($link, $engine, "TEXT", "a", "a", 800);
  221. func_mysqli_fetch_all($link, $engine, "TEXT", chr(0) . "a", chr(0) . "a", 810);
  222. func_mysqli_fetch_all($link, $engine, "TEXT", NULL, NULL, 820);
  223. func_mysqli_fetch_all($link, $engine, "MEDIUMBLOB", "a", "a", 830);
  224. func_mysqli_fetch_all($link, $engine, "MEDIUMBLOB", chr(0) . "a", chr(0) . "a", 840);
  225. func_mysqli_fetch_all($link, $engine, "MEDIUMBLOB", NULL, NULL, 850);
  226. func_mysqli_fetch_all($link, $engine, "MEDIUMTEXT", "a", "a", 860);
  227. func_mysqli_fetch_all($link, $engine, "MEDIUMTEXT", chr(0) . "a", chr(0) . "a", 870);
  228. func_mysqli_fetch_all($link, $engine, "MEDIUMTEXT", NULL, NULL, 880);
  229. func_mysqli_fetch_all($link, $engine, "LONGBLOB", "a", "a", 890);
  230. func_mysqli_fetch_all($link, $engine, "LONGTEXT", chr(0) . "a", chr(0) . "a", 900);
  231. func_mysqli_fetch_all($link, $engine, "LONGBLOB", NULL, NULL, 910);
  232. func_mysqli_fetch_all($link, $engine, "ENUM('a', 'b')", "a", "a", 920);
  233. func_mysqli_fetch_all($link, $engine, "ENUM('a', 'b')", NULL, NULL, 930);
  234. func_mysqli_fetch_all($link, $engine, "SET('a', 'b')", "a", "a", 940);
  235. func_mysqli_fetch_all($link, $engine, "SET('a', 'b')", NULL, NULL, 950);
  236. mysqli_close($link);
  237. if (null !== ($tmp = mysqli_fetch_array($res, MYSQLI_ASSOC)))
  238. printf("[015] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
  239. if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
  240. printf("[016] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
  241. $host, $user, $db, $port, $socket);
  242. }
  243. if (!$res = mysqli_real_query($link, "SELECT 1 AS _one"))
  244. printf("[017] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
  245. /* on mysqlnd level this would not be allowed */
  246. if (!is_object($res = mysqli_use_result($link)))
  247. printf("[018] Expecting object, got %s/%s. [%d] %s\n",
  248. gettype($res), $res, mysqli_errno($link), mysqli_error($link));
  249. $rows = mysqli_fetch_all($res, MYSQLI_ASSOC);
  250. if (!is_array($rows) || (count($rows) > 1) || !isset($rows[0]['_one']) || ($rows[0]['_one'] != 1)) {
  251. printf("[019] Results seem wrong, dumping\n");
  252. var_dump($rows);
  253. }
  254. print "done!";
  255. ?>
  256. --CLEAN--
  257. <?php
  258. // require_once("clean_table.inc");
  259. ?>
  260. --EXPECTF--
  261. [005]
  262. array(2) {
  263. [0]=>
  264. array(2) {
  265. [0]=>
  266. %unicode|string%(1) "1"
  267. [1]=>
  268. %unicode|string%(1) "a"
  269. }
  270. [1]=>
  271. array(2) {
  272. [0]=>
  273. %unicode|string%(1) "2"
  274. [1]=>
  275. %unicode|string%(1) "b"
  276. }
  277. }
  278. [007]
  279. array(2) {
  280. [0]=>
  281. array(2) {
  282. [0]=>
  283. %unicode|string%(1) "1"
  284. [1]=>
  285. %unicode|string%(1) "a"
  286. }
  287. [1]=>
  288. array(2) {
  289. [0]=>
  290. %unicode|string%(1) "2"
  291. [1]=>
  292. %unicode|string%(1) "b"
  293. }
  294. }
  295. [008]
  296. array(2) {
  297. [0]=>
  298. array(4) {
  299. [0]=>
  300. %unicode|string%(1) "1"
  301. [%u|b%"id"]=>
  302. %unicode|string%(1) "1"
  303. [1]=>
  304. %unicode|string%(1) "a"
  305. [%u|b%"label"]=>
  306. %unicode|string%(1) "a"
  307. }
  308. [1]=>
  309. array(4) {
  310. [0]=>
  311. %unicode|string%(1) "2"
  312. [%u|b%"id"]=>
  313. %unicode|string%(1) "2"
  314. [1]=>
  315. %unicode|string%(1) "b"
  316. [%u|b%"label"]=>
  317. %unicode|string%(1) "b"
  318. }
  319. }
  320. [010]
  321. array(2) {
  322. [0]=>
  323. array(2) {
  324. [%u|b%"id"]=>
  325. %unicode|string%(1) "1"
  326. [%u|b%"label"]=>
  327. %unicode|string%(1) "a"
  328. }
  329. [1]=>
  330. array(2) {
  331. [%u|b%"id"]=>
  332. %unicode|string%(1) "2"
  333. [%u|b%"label"]=>
  334. %unicode|string%(1) "b"
  335. }
  336. }
  337. [011]
  338. array(0) {
  339. }
  340. [013]
  341. array(2) {
  342. [0]=>
  343. array(2) {
  344. [%u|b%"id"]=>
  345. %unicode|string%(1) "1"
  346. [%u|b%"label"]=>
  347. %unicode|string%(1) "a"
  348. }
  349. [1]=>
  350. array(2) {
  351. [%u|b%"id"]=>
  352. %unicode|string%(1) "2"
  353. [%u|b%"label"]=>
  354. %unicode|string%(1) "b"
  355. }
  356. }
  357. [016]
  358. array(0) {
  359. }
  360. [017]
  361. array(1) {
  362. [0]=>
  363. array(11) {
  364. [0]=>
  365. %unicode|string%(1) "1"
  366. [%u|b%"a"]=>
  367. %unicode|string%(1) "2"
  368. [1]=>
  369. %unicode|string%(1) "2"
  370. [2]=>
  371. %unicode|string%(1) "3"
  372. [%u|b%"c"]=>
  373. %unicode|string%(1) "3"
  374. [3]=>
  375. %unicode|string%(1) "4"
  376. [%u|b%"C"]=>
  377. %unicode|string%(1) "4"
  378. [4]=>
  379. NULL
  380. [%u|b%"d"]=>
  381. NULL
  382. [5]=>
  383. %unicode|string%(1) "1"
  384. [%u|b%"e"]=>
  385. %unicode|string%(1) "1"
  386. }
  387. }
  388. Warning: mysqli_fetch_all(): Mode can be only MYSQLI_FETCH_NUM, MYSQLI_FETCH_ASSOC or MYSQLI_FETCH_BOTH in %s on line %d
  389. Warning: mysqli_fetch_array(): Couldn't fetch mysqli_result in %s on line %d
  390. done!