diff options
Diffstat (limited to 'ext/mysqli/tests/mysqli_fetch_assoc.phpt')
-rw-r--r-- | ext/mysqli/tests/mysqli_fetch_assoc.phpt | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/ext/mysqli/tests/mysqli_fetch_assoc.phpt b/ext/mysqli/tests/mysqli_fetch_assoc.phpt index 6ae91ad74a..0c73a63062 100644 --- a/ext/mysqli/tests/mysqli_fetch_assoc.phpt +++ b/ext/mysqli/tests/mysqli_fetch_assoc.phpt @@ -8,64 +8,64 @@ require_once('skipifconnectfailure.inc'); ?> --FILE-- <?php - require_once("connect.inc"); + require_once("connect.inc"); - $tmp = NULL; - $link = NULL; + $tmp = NULL; + $link = NULL; - // Note: no SQL type tests, internally the same function gets used as for mysqli_fetch_array() which does a lot of SQL type test + // Note: no SQL type tests, internally the same function gets used as for mysqli_fetch_array() which does a lot of SQL type test - if (!is_null($tmp = @mysqli_fetch_assoc())) - printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); + if (!is_null($tmp = @mysqli_fetch_assoc())) + printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); - if (!is_null($tmp = @mysqli_fetch_assoc($link))) - printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); + if (!is_null($tmp = @mysqli_fetch_assoc($link))) + printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); - require('table.inc'); - if (!$res = mysqli_query($link, "SELECT id, label FROM test ORDER BY id LIMIT 1")) { - printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - } + require('table.inc'); + if (!$res = mysqli_query($link, "SELECT id, label FROM test ORDER BY id LIMIT 1")) { + printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); + } - print "[005]\n"; - var_dump(mysqli_fetch_assoc($res)); + print "[005]\n"; + var_dump(mysqli_fetch_assoc($res)); - print "[006]\n"; - var_dump(mysqli_fetch_assoc($res)); + print "[006]\n"; + var_dump(mysqli_fetch_assoc($res)); - mysqli_free_result($res); + mysqli_free_result($res); - if (!$res = mysqli_query($link, "SELECT - 1 AS a, - 2 AS a, - 3 AS c, - 4 AS C, - NULL AS d, - true AS e, - 5 AS '-1', - 6 AS '-10', - 7 AS '-100', - 8 AS '-1000', - 9 AS '10000', - 'a' AS '100000', - 'b' AS '1000000', - 'c' AS '9', - 'd' AS '9', - 'e' AS '01', - 'f' AS '-02' - ")) { - printf("[007] Cannot run query, [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - } - print "[008]\n"; - var_dump(mysqli_fetch_assoc($res)); + if (!$res = mysqli_query($link, "SELECT + 1 AS a, + 2 AS a, + 3 AS c, + 4 AS C, + NULL AS d, + true AS e, + 5 AS '-1', + 6 AS '-10', + 7 AS '-100', + 8 AS '-1000', + 9 AS '10000', + 'a' AS '100000', + 'b' AS '1000000', + 'c' AS '9', + 'd' AS '9', + 'e' AS '01', + 'f' AS '-02' + ")) { + printf("[007] Cannot run query, [%d] %s\n", mysqli_errno($link), mysqli_error($link)); + } + print "[008]\n"; + var_dump(mysqli_fetch_assoc($res)); - mysqli_free_result($res); + mysqli_free_result($res); - if (false !== ($tmp = mysqli_fetch_assoc($res))) - printf("[008] Expecting false, got %s/%s\n", gettype($tmp), $tmp); + if (false !== ($tmp = mysqli_fetch_assoc($res))) + printf("[008] Expecting false, got %s/%s\n", gettype($tmp), $tmp); - mysqli_close($link); + mysqli_close($link); - print "done!"; + print "done!"; ?> --CLEAN-- <?php |