PageRenderTime 47ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/zend/bad/ext/mysqli/tests/mysqli_stmt_bind_param.php

http://github.com/facebook/hiphop-php
PHP | 364 lines | 264 code | 70 blank | 30 comment | 66 complexity | b3b6112890b5b3b919c3870d0d180815 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
  1. <?php
  2. /*
  3. The way we test the INSERT and data types overlaps with
  4. the mysqli_stmt_bind_result test in large parts. There is only
  5. one difference. This test uses mysqli_query()/mysqli_fetch_assoc() to
  6. fetch the inserted values. This way we test
  7. mysqli_query()/mysqli_fetch_assoc() for all possible data types
  8. in this file and we test mysqli_stmt_bind_result() in the other
  9. test -- therefore the "duplicate" makes some sense to me.
  10. */
  11. require_once("connect.inc");
  12. $tmp = NULL;
  13. $link = NULL;
  14. $test_table_name = 'test_mysqli_stmt_bind_param_table_1'; require('table.inc');
  15. $stmt = mysqli_stmt_init($link);
  16. if (!mysqli_stmt_prepare($stmt, "INSERT INTO test_mysqli_stmt_bind_param_table_1(id, label) VALUES (?, ?)"))
  17. printf("[003] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
  18. $id = null;
  19. $label = null;
  20. /*
  21. libmysql gives a less descriptive error message but mysqlnd,
  22. we did not unify the error messages but ignore this slight difference silently
  23. */
  24. /* TODO: somehwhat undocumented syntax! */
  25. $param = array($id);
  26. if (!false === ($tmp = mysqli_stmt_bind_param($stmt, "is", $param)))
  27. printf("[003b] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
  28. $param = array($id, $label, $id);
  29. if (!false === ($tmp = mysqli_stmt_bind_param($stmt, "is", $param)))
  30. printf("[003c] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
  31. if (!false === ($tmp = mysqli_stmt_bind_param($stmt, "a", $id)))
  32. printf("[004] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
  33. if (!false === ($tmp = mysqli_stmt_bind_param($stmt, "a", $id, $label)))
  34. printf("[005] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
  35. if (!false === ($tmp = mysqli_stmt_bind_param($stmt, "aa", $id, $label)))
  36. printf("[006] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
  37. if (!false === ($tmp = mysqli_stmt_bind_param($stmt, "ia", $id, $label)))
  38. printf("[007] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
  39. if (!true === ($tmp = mysqli_stmt_bind_param($stmt, "is", $id, $label)))
  40. printf("[008] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
  41. if (function_exists("memory_get_usage")) {
  42. $mem = memory_get_usage();
  43. for ($i = 0; $i < 20000; $i++) {
  44. if (!true === ($tmp = mysqli_stmt_bind_param($stmt, "is", $id, $label)))
  45. printf("[008][$i] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
  46. }
  47. if (($tmp = (memory_get_usage() - $mem)) > 600)
  48. printf("[009] Function seems to be leaking, because it used %d bytes. During tests it used only 92 bytes.", $tmp);
  49. }
  50. $id = 100;
  51. $label = "z";
  52. if (!mysqli_stmt_execute($stmt))
  53. printf("[010] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
  54. mysqli_stmt_close($stmt);
  55. if (!($res = mysqli_query($link, "SELECT id, label FROM test_mysqli_stmt_bind_param_table_1 WHERE id = " . $id)))
  56. printf("[011] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
  57. $row = mysqli_fetch_assoc($res);
  58. if (($row['id'] != $id) || ($row['label'] != $label))
  59. printf("[012] Expecting '%s'/%s', got '%s'/%s'!\n", $id, $label, $row['id'], $row['label']);
  60. mysqli_free_result($res);
  61. function func_mysqli_stmt_bind_datatype($link, $engine, $bind_type, $sql_type, $bind_value, $offset, $alternative = null) {
  62. if (!mysqli_query($link, "DROP TABLE IF EXISTS test_mysqli_stmt_bind_param_table_1")) {
  63. printf("[%03d] [%d] %s\n", $offset, mysqli_errno($link), mysqli_error($link));
  64. return false;
  65. }
  66. if (!mysqli_query($link, sprintf("CREATE TABLE test_mysqli_stmt_bind_param_table_1(id INT NOT NULL, label %s, PRIMARY KEY(id)) ENGINE = %s", $sql_type, $engine))) {
  67. // don't bail - it might be that the server does not support the data type
  68. return false;
  69. }
  70. if (!$stmt = mysqli_stmt_init($link)) {
  71. printf("[%03d] [%d] %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link));
  72. return false;
  73. }
  74. if (!mysqli_stmt_prepare($stmt, "INSERT INTO test_mysqli_stmt_bind_param_table_1(id, label) VALUE (?, ?)")) {
  75. printf("[%03d] [%d] %s\n", $offset + 2, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
  76. return false;
  77. }
  78. $id = 1;
  79. if (!mysqli_stmt_bind_param($stmt, "i" . $bind_type, $id, $bind_value)) {
  80. printf("[%03d] [%d] %s\n", $offset + 3, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
  81. return false;
  82. }
  83. if (!mysqli_stmt_execute($stmt)) {
  84. printf("[%03d] [%d] %s\n", $offset + 4, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
  85. return false;
  86. }
  87. mysqli_stmt_close($stmt);
  88. if (!$res = mysqli_query($link, "SELECT id, label FROM test_mysqli_stmt_bind_param_table_1")) {
  89. printf("[%03d] [%d] %s\n", $offset + 5, mysqli_errno($link), mysqli_error($link));
  90. return false;
  91. }
  92. if (!$row = mysqli_fetch_assoc($res)) {
  93. printf("[%03d] [%d] %s\n", $offset + 5, mysqli_errno($link), mysqli_error($link));
  94. return false;
  95. }
  96. if ($alternative) {
  97. if (($row['id'] != $id) || (($row['label'] != $bind_value) && ($row['label'] != $alternative))) {
  98. printf("[%03d] Testing '%s', '%s': expecting '%s'/'%s' (%s), got '%s'/'%s'\n",
  99. $offset + 6, $bind_type, $sql_type,
  100. $id, $bind_value, gettype($bind_value), $row['id'], $row['label']);
  101. return false;
  102. }
  103. } else {
  104. if (($row['id'] != $id) || ($row['label'] != $bind_value)) {
  105. printf("[%03d] Testing '%s', '%s': expecting '%s'/'%s', got '%s'/'%s'\n",
  106. $offset + 6, $bind_type, $sql_type,
  107. $id, $bind_value, $row['id'], $row['label']);
  108. return false;
  109. }
  110. }
  111. mysqli_free_result($res);
  112. return true;
  113. }
  114. function func_mysqli_stmt_bind_make_string($len) {
  115. $ret = '';
  116. for ($i = 0; $i < $len; $i++)
  117. $ret .= chr(mt_rand(65, 90));
  118. return $ret;
  119. }
  120. func_mysqli_stmt_bind_datatype($link, $engine, "i", "TINYINT", -11, 20);
  121. func_mysqli_stmt_bind_datatype($link, $engine, "i", "TINYINT", NULL, 30);
  122. func_mysqli_stmt_bind_datatype($link, $engine, "i", "TINYINT UNSIGNED", 1, 40);
  123. func_mysqli_stmt_bind_datatype($link, $engine, "i", "TINYINT UNSIGNED", NULL, 50);
  124. func_mysqli_stmt_bind_datatype($link, $engine, "i", "BOOL", 1, 60);
  125. func_mysqli_stmt_bind_datatype($link, $engine, "i", "BOOL", NULL, 70);
  126. func_mysqli_stmt_bind_datatype($link, $engine, "i", "BOOLEAN", 0, 80);
  127. func_mysqli_stmt_bind_datatype($link, $engine, "i", "BOOLEAN", NULL, 90);
  128. func_mysqli_stmt_bind_datatype($link, $engine, "i", "SMALLINT", -32768, 100);
  129. func_mysqli_stmt_bind_datatype($link, $engine, "i", "SMALLINT", 32767, 110);
  130. func_mysqli_stmt_bind_datatype($link, $engine, "i", "SMALLINT", NULL, 120);
  131. func_mysqli_stmt_bind_datatype($link, $engine, "i", "SMALLINT UNSIGNED", 65535, 130);
  132. func_mysqli_stmt_bind_datatype($link, $engine, "i", "SMALLINT UNSIGNED", NULL, 140);
  133. func_mysqli_stmt_bind_datatype($link, $engine, "i", "MEDIUMINT", -8388608, 150);
  134. func_mysqli_stmt_bind_datatype($link, $engine, "i", "MEDIUMINT", 8388607, 160);
  135. func_mysqli_stmt_bind_datatype($link, $engine, "i", "MEDIUMINT", NULL, 170);
  136. func_mysqli_stmt_bind_datatype($link, $engine, "i", "MEDIUMINT UNSIGNED", 16777215, 180);
  137. func_mysqli_stmt_bind_datatype($link, $engine, "i", "MEDIUMINT UNSIGNED", NULL, 190);
  138. func_mysqli_stmt_bind_datatype($link, $engine, "i", "INTEGER", -2147483648, 200);
  139. func_mysqli_stmt_bind_datatype($link, $engine, "i", "INTEGER", 2147483647, 210);
  140. func_mysqli_stmt_bind_datatype($link, $engine, "i", "INTEGER", NULL, 220);
  141. func_mysqli_stmt_bind_datatype($link, $engine, "i", "INTEGER UNSIGNED", (defined("PHP_INT_MAX")) ? min(4294967295, PHP_INT_MAX) : 1, 230);
  142. func_mysqli_stmt_bind_datatype($link, $engine, "d", "INTEGER UNSIGNED", 4294967295, 240);
  143. func_mysqli_stmt_bind_datatype($link, $engine, "i", "INTEGER UNSIGNED", NULL, 250);
  144. func_mysqli_stmt_bind_datatype($link, $engine, "i", "BIGINT", -1 * PHP_INT_MAX + 1, 260);
  145. func_mysqli_stmt_bind_datatype($link, $engine, "i", "BIGINT", NULL, 270);
  146. func_mysqli_stmt_bind_datatype($link, $engine, "i", "BIGINT", PHP_INT_MAX, 280);
  147. func_mysqli_stmt_bind_datatype($link, $engine, "i", "BIGINT UNSIGNED", NULL, 290);
  148. func_mysqli_stmt_bind_datatype($link, $engine, "s", "BIGINT", "-9223372036854775808", 900);
  149. // ?? func_mysqli_stmt_bind_datatype($link, $engine, "d", "BIGINT", -9223372036854775808, 910);
  150. func_mysqli_stmt_bind_datatype($link, $engine, "s", "BIGINT UNSIGNED", "18446744073709551615", 920);
  151. /*
  152. ??
  153. func_mysqli_stmt_bind_datatype($link, $engine, "d", "FLOAT", -9223372036854775808 - 1.1, 300);
  154. func_mysqli_stmt_bind_datatype($link, $engine, "d", "FLOAT UNSIGNED", 18446744073709551615 + 1.1, 320);
  155. */
  156. func_mysqli_stmt_bind_datatype($link, $engine, "d", "FLOAT", NULL, 310);
  157. func_mysqli_stmt_bind_datatype($link, $engine, "d", "FLOAT UNSIGNED ", NULL, 330);
  158. if (2147483647 == PHP_INT_MAX) {
  159. func_mysqli_stmt_bind_datatype($link, $engine, "d", "FLOAT UNSIGNED", PHP_INT_MAX, 930, '2.14748e+09');
  160. func_mysqli_stmt_bind_datatype($link, $engine, "d", "FLOAT", -1 * PHP_INT_MAX + 1, 940, '-2.14748e+09');
  161. }
  162. func_mysqli_stmt_bind_datatype($link, $engine, "s", "FLOAT", "-9223372036854775808", 300, '-9.22337e+18');
  163. func_mysqli_stmt_bind_datatype($link, $engine, "s", "FLOAT UNSIGNED", "18446744073709551615", 320, '1.84467e+19');
  164. func_mysqli_stmt_bind_datatype($link, $engine, "d", "FLOAT", -10.01, 950);
  165. func_mysqli_stmt_bind_datatype($link, $engine, "d", "FLOAT UNSIGNED", 10.01, 960);
  166. func_mysqli_stmt_bind_datatype($link, $engine, "d", "DOUBLE(10,2)", NULL, 350);
  167. func_mysqli_stmt_bind_datatype($link, $engine, "d", "DOUBLE(10,2) UNSIGNED", NULL, 370);
  168. func_mysqli_stmt_bind_datatype($link, $engine, "d", "DOUBLE(10,2)", -99999999.99, 340);
  169. func_mysqli_stmt_bind_datatype($link, $engine, "d", "DOUBLE(10,2) UNSIGNED", 99999999.99, 360);
  170. /*
  171. func_mysqli_stmt_bind_datatype($link, $engine, "d", "DOUBLE(10,2)", -99999999.99, 340);
  172. func_mysqli_stmt_bind_datatype($link, $engine, "d", "DOUBLE(10,2) UNSIGNED", 99999999.99, 360);
  173. */
  174. func_mysqli_stmt_bind_datatype($link, $engine, "d", "DECIMAL(10,2)", -99999999.99, 380);
  175. func_mysqli_stmt_bind_datatype($link, $engine, "d", "DECIMAL(10,2)", NULL, 390);
  176. func_mysqli_stmt_bind_datatype($link, $engine, "d", "DECIMAL(10,2)", 99999999.99, 400);
  177. func_mysqli_stmt_bind_datatype($link, $engine, "d", "DECIMAL(10,2)", NULL, 410);
  178. // don't care about date() strict TZ warnings...
  179. func_mysqli_stmt_bind_datatype($link, $engine, "s", "DATE", @date('Y-m-d'), 420);
  180. func_mysqli_stmt_bind_datatype($link, $engine, "s", "DATE NOT NULL", @date('Y-m-d'), 430);
  181. func_mysqli_stmt_bind_datatype($link, $engine, "s", "DATE", NULL, 440);
  182. func_mysqli_stmt_bind_datatype($link, $engine, "s", "DATETIME", @date('Y-m-d H:i:s'), 450);
  183. func_mysqli_stmt_bind_datatype($link, $engine, "s", "DATETIME NOT NULL", @date('Y-m-d H:i:s'), 460);
  184. func_mysqli_stmt_bind_datatype($link, $engine, "s", "DATETIME", NULL, 470);
  185. func_mysqli_stmt_bind_datatype($link, $engine, "s", "TIMESTAMP", @date('Y-m-d H:i:s'), 480);
  186. func_mysqli_stmt_bind_datatype($link, $engine, "s", "TIME", @date('H:i:s'), 490);
  187. func_mysqli_stmt_bind_datatype($link, $engine, "s", "TIME NOT NULL", @date('H:i:s'), 500);
  188. func_mysqli_stmt_bind_datatype($link, $engine, "s", "TIME", NULL, 510);
  189. func_mysqli_stmt_bind_datatype($link, $engine, "s", "YEAR", @date('Y'), 520);
  190. func_mysqli_stmt_bind_datatype($link, $engine, "s", "YEAR NOT NULL", @date('Y'), 530);
  191. func_mysqli_stmt_bind_datatype($link, $engine, "s", "YEAR", NULL, 540);
  192. $string255 = func_mysqli_stmt_bind_make_string(255);
  193. func_mysqli_stmt_bind_datatype($link, $engine, "s", "CHAR(1)", "a", 550);
  194. func_mysqli_stmt_bind_datatype($link, $engine, "s", "CHAR(255)", $string255, 560);
  195. func_mysqli_stmt_bind_datatype($link, $engine, "s", "CHAR(1) NOT NULL", "a", 570);
  196. func_mysqli_stmt_bind_datatype($link, $engine, "s", "CHAR(1)", NULL, 580);
  197. $string65k = func_mysqli_stmt_bind_make_string(65535);
  198. func_mysqli_stmt_bind_datatype($link, $engine, "s", "VARCHAR(1)", "a", 590);
  199. func_mysqli_stmt_bind_datatype($link, $engine, "s", "VARCHAR(255)", $string255, 600);
  200. func_mysqli_stmt_bind_datatype($link, $engine, "s", "VARCHAR(65635)", $string65k, 610);
  201. func_mysqli_stmt_bind_datatype($link, $engine, "s", "VARCHAR(1) NOT NULL", "a", 620);
  202. func_mysqli_stmt_bind_datatype($link, $engine, "s", "VARCHAR(1)", NULL, 630);
  203. func_mysqli_stmt_bind_datatype($link, $engine, "s", "BINARY(1)", "a", 640);
  204. func_mysqli_stmt_bind_datatype($link, $engine, "s", "BINARY(1)", chr(0), 650);
  205. func_mysqli_stmt_bind_datatype($link, $engine, "s", "BINARY(1) NOT NULL", "b", 660);
  206. func_mysqli_stmt_bind_datatype($link, $engine, "s", "BINARY(1)", NULL, 670);
  207. func_mysqli_stmt_bind_datatype($link, $engine, "s", "VARBINARY(1)", "a", 680);
  208. func_mysqli_stmt_bind_datatype($link, $engine, "s", "VARBINARY(1)", chr(0), 690);
  209. func_mysqli_stmt_bind_datatype($link, $engine, "s", "VARBINARY(1) NOT NULL", "b", 700);
  210. func_mysqli_stmt_bind_datatype($link, $engine, "s", "VARBINARY(1)", NULL, 710);
  211. func_mysqli_stmt_bind_datatype($link, $engine, "s", "TINYBLOB", "a", 720);
  212. func_mysqli_stmt_bind_datatype($link, $engine, "s", "TINYBLOB", chr(0), 730);
  213. func_mysqli_stmt_bind_datatype($link, $engine, "s", "TINYBLOB NOT NULL", "b", 740);
  214. func_mysqli_stmt_bind_datatype($link, $engine, "s", "TINYBLOB", NULL, 750);
  215. func_mysqli_stmt_bind_datatype($link, $engine, "s", "TINYTEXT", "a", 760);
  216. func_mysqli_stmt_bind_datatype($link, $engine, "s", "TINYTEXT NOT NULL", "a", 770);
  217. func_mysqli_stmt_bind_datatype($link, $engine, "s", "TINYTEXT", NULL, 780);
  218. // Note: you cannot insert any blob values this way. But you can check the API at least partly this way
  219. // Extra BLOB tests are in mysqli_stmt_send_long()
  220. func_mysqli_stmt_bind_datatype($link, $engine, "b", "BLOB", "", 790);
  221. func_mysqli_stmt_bind_datatype($link, $engine, "b", "TEXT", "", 800);
  222. func_mysqli_stmt_bind_datatype($link, $engine, "b", "MEDIUMBLOB", "", 810);
  223. func_mysqli_stmt_bind_datatype($link, $engine, "b", "MEDIUMTEXT", "", 820);
  224. func_mysqli_stmt_bind_datatype($link, $engine, "b", "LONGBLOB", "", 830);
  225. func_mysqli_stmt_bind_datatype($link, $engine, "b", "LONGTEXT", "", 840);
  226. func_mysqli_stmt_bind_datatype($link, $engine, "s", "ENUM('a', 'b')", "a", 850);
  227. func_mysqli_stmt_bind_datatype($link, $engine, "s", "ENUM('a', 'b')", NULL, 860);
  228. func_mysqli_stmt_bind_datatype($link, $engine, "s", "SET('a', 'b')", "a", 870);
  229. func_mysqli_stmt_bind_datatype($link, $engine, "s", "SET('a', 'b')", NULL, 880);
  230. if (mysqli_get_server_version($link) >= 50600)
  231. func_mysqli_stmt_bind_datatype($link, $engine, "s", "TIME", "13:27:34.123456", 890, "13:27:34");
  232. $stmt = mysqli_stmt_init($link);
  233. if (!mysqli_stmt_prepare($stmt, "INSERT INTO test_mysqli_stmt_bind_param_table_1(id, label) VALUES (?, ?)"))
  234. printf("[2000] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
  235. $id = null;
  236. $label = null;
  237. if (true !== ($tmp = mysqli_stmt_bind_param($stmt, "is", $id, $label)))
  238. printf("[2001] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
  239. mysqli_stmt_execute($stmt);
  240. if (true !== ($tmp = mysqli_stmt_bind_param($stmt, "is", $id, $label)))
  241. printf("[2002] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
  242. mysqli_stmt_close($stmt);
  243. include("table.inc");
  244. if (!$stmt = mysqli_stmt_init($link))
  245. printf("[2003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
  246. if (!mysqli_stmt_prepare($stmt, "INSERT INTO test_mysqli_stmt_bind_param_table_1(id, label) VALUES (?, ?)"))
  247. printf("[2004] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
  248. $id = $label = null;
  249. if (true !== ($tmp = $stmt->bind_param('is', $id, $label)))
  250. printf("[2005] Expecting boolean/true got %s/%s, [%d] %s\n",
  251. gettype($tmp), $tmp,
  252. $stmt->errno, $stmt->error);
  253. $id = 100; $label = 'z';
  254. if (!$stmt->execute())
  255. printf("[2006] [%d] %s\n", $stmt->errno, $stmt->error);
  256. if (!$res = mysqli_query($link, "SELECT id, label FROM test_mysqli_stmt_bind_param_table_1 WHERE id = 100"))
  257. printf("[2007] Expecting record 100/z, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
  258. if (!$row = mysqli_fetch_assoc($res))
  259. printf("[2008] Expecting row, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
  260. if ($row['id'] != 100 || $row['label'] != 'z') {
  261. printf("[2009] Row seems wrong, dumping record\n");
  262. var_dump($row);
  263. }
  264. mysqli_free_result($res);
  265. $value_list = array(array('id' => 101, 'label' => 'a'), array('id' => 102, 'label' => 'b'));
  266. if (!mysqli_stmt_prepare($stmt, "INSERT INTO test_mysqli_stmt_bind_param_table_1(id, label) VALUES (?, ?)"))
  267. printf("[2010] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
  268. foreach ($value_list as $k => $values) {
  269. if (!mysqli_stmt_bind_param($stmt, 'is', $values['id'], $values['label'])) {
  270. printf("[2011] bind_param() failed for id = %d, [%d] %s\n",
  271. $values['id'], mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
  272. continue;
  273. }
  274. if (!$stmt->execute())
  275. printf("[2012] [%d] execute() failed for id = %d, [%d] %s\n",
  276. $values['id'], mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
  277. if (!$res = mysqli_query($link, sprintf("SELECT label FROM test_mysqli_stmt_bind_param_table_1 WHERE id = %d", $values['id'])))
  278. printf("[2013] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
  279. if (!$row = mysqli_fetch_assoc($res))
  280. printf("[2014] Cannot find row id = %d\n", $values['id']);
  281. else if (isset($row['label']) && ($values['label'] != $row['label']))
  282. printf("[2015] Expecting label = %s, got label = %s\n", $values['label'], $row['label']);
  283. mysqli_free_result($res);
  284. }
  285. mysqli_stmt_close($stmt);
  286. mysqli_close($link);
  287. /* Check that the function alias exists. It's a deprecated function,
  288. but we have not announce the removal so far, therefore we need to check for it */
  289. print "done!";
  290. ?>
  291. <?php error_reporting(0); ?>
  292. <?php
  293. $test_table_name = 'test_mysqli_stmt_bind_param_table_1'; require_once("clean_table.inc");
  294. ?>