1--TEST-- 2mysqli_stmt_bind_result (SHOW) 3--EXTENSIONS-- 4mysqli 5--SKIPIF-- 6<?php 7 require_once('skipifconnectfailure.inc'); 8 9 require_once("connect.inc"); 10 $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); 11 12 $stmt = mysqli_prepare($link, "SHOW VARIABLES LIKE 'port'"); 13 mysqli_stmt_execute($stmt); 14 15 if (!$stmt->field_count) { 16 printf("skip SHOW command is not supported in prepared statements."); 17 } 18 $stmt->close(); 19 mysqli_close($link); 20?> 21--FILE-- 22<?php 23 require_once("connect.inc"); 24 25 /*** test mysqli_connect 127.0.0.1 ***/ 26 $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); 27 28 $stmt = mysqli_prepare($link, "SHOW VARIABLES LIKE 'port'"); 29 mysqli_stmt_execute($stmt); 30 31 mysqli_stmt_bind_result($stmt, $c1, $c2); 32 mysqli_stmt_fetch($stmt); 33 mysqli_stmt_close($stmt); 34 $test = array ($c1,$c2); 35 36 var_dump($test); 37 38 mysqli_close($link); 39 print "done!"; 40?> 41--EXPECTF-- 42array(2) { 43 [0]=> 44 string(4) "port" 45 [1]=> 46 string(%d) "%s" 47} 48done! 49