]> granicus.if.org Git - php/commitdiff
test for bind_result with show
authorGeorg Richter <georg@php.net>
Fri, 14 Feb 2003 19:49:35 +0000 (19:49 +0000)
committerGeorg Richter <georg@php.net>
Fri, 14 Feb 2003 19:49:35 +0000 (19:49 +0000)
ext/mysqli/tests/045.phpt [new file with mode: 0644]

diff --git a/ext/mysqli/tests/045.phpt b/ext/mysqli/tests/045.phpt
new file mode 100644 (file)
index 0000000..5ca0f2a
--- /dev/null
@@ -0,0 +1,28 @@
+--TEST--
+mysqli_bind_result (SHOW)
+--FILE--
+<?php
+       include "connect.inc";
+       
+       /*** test mysqli_connect 127.0.0.1 ***/
+       $link = mysqli_connect("localhost", $user, $passwd);
+
+       $stmt = mysqli_prepare($link, "SHOW VARIABLES LIKE 'port'");
+
+       mysqli_execute($stmt);
+       mysqli_bind_result($stmt, &$c1, &$c2);  
+       mysqli_fetch($stmt);
+       mysqli_stmt_close($stmt);       
+       $test = array ($c1,$c2);
+
+       var_dump($test);
+
+       mysqli_close($link);
+?>
+--EXPECT--
+array(2) {
+  [0]=>
+  string(4) "port"
+  [1]=>
+  string(4) "3306"
+}