diff options
author | Ulf Wendel <uw@php.net> | 2011-09-01 13:37:49 +0000 |
---|---|---|
committer | Ulf Wendel <uw@php.net> | 2011-09-01 13:37:49 +0000 |
commit | 3c15d50c80c2e7ee3e8d316372923a06e7223fe1 (patch) | |
tree | 25d3d3288dc531d18992ea9344da66e2a688cdf3 /ext/mysqli | |
parent | f079dffe077d03ca183769cd26c259600260a435 (diff) | |
download | php-git-3c15d50c80c2e7ee3e8d316372923a06e7223fe1.tar.gz |
Fixing tests debug output
Diffstat (limited to 'ext/mysqli')
-rw-r--r-- | ext/mysqli/tests/004.phpt | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/ext/mysqli/tests/004.phpt b/ext/mysqli/tests/004.phpt index ce222fea42..010d6e1960 100644 --- a/ext/mysqli/tests/004.phpt +++ b/ext/mysqli/tests/004.phpt @@ -15,24 +15,27 @@ require_once('skipifconnectfailure.inc'); mysqli_select_db($link, $db); if (!mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch")) - printf("[001] [%d] string\n", mysqli_errno($link), mysqli_error($link)); + printf("[001] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); if (!mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 char(10), c2 text) ENGINE=" . $engine)) - printf("[002] [%d] string\n", mysqli_errno($link), mysqli_error($link)); + printf("[002] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); if (!mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567890', 'this is a test0')")) - printf("[003] [%d] string\n", mysqli_errno($link), mysqli_error($link)); + printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); if (!mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567891', 'this is a test1')")) - printf("[004] [%d] string\n", mysqli_errno($link), mysqli_error($link)); + printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); if (!mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567892', 'this is a test2')")) - printf("[005] [%d] string\n", mysqli_errno($link), mysqli_error($link)); + printf("[005] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); if (!mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567893', 'this is a test3')")) - printf("[006] [%d] string\n", mysqli_errno($link), mysqli_error($link)); + printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch ORDER BY c1"); + if (!$stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch ORDER BY c1")) + printf("[007] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); + + $c1 = $c2 = NULL; mysqli_stmt_bind_result($stmt, $c1, $c2); mysqli_stmt_execute($stmt); $i = 4; |