From b259f66300043977043a6028f1df69a5d3bb82fa Mon Sep 17 00:00:00 2001 From: Hartmut Holzgraefe Date: Tue, 11 Jul 2006 07:04:16 +0000 Subject: [PATCH] test multi_query(), next_result(), more_results() (only partially covered by a bug testcase yet) --- ext/mysqli/tests/069.phpt | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 ext/mysqli/tests/069.phpt diff --git a/ext/mysqli/tests/069.phpt b/ext/mysqli/tests/069.phpt new file mode 100644 index 00000000000..d5110d02bfe --- /dev/null +++ b/ext/mysqli/tests/069.phpt @@ -0,0 +1,34 @@ +--TEST-- +mysqli multi_query, next_result, more_results +--SKIPIF-- + +--FILE-- +multi_query('SELECT 1;SELECT 2'); + do { + $res = $mysql->store_result(); + if ($mysql->errno == 0) { + while ($arr = $res->fetch_assoc()) { + var_dump($arr); + } + $res->free(); + } + if ($mysql->more_results()) { + echo "---\n"; + } + } while ($mysql->next_result()); + $mysql->close(); +?> +--EXPECT-- +array(1) { + [1]=> + string(1) "1" +} +--- +array(1) { + [2]=> + string(1) "2" +}