2003-02-14 19:49:35 +00:00
|
|
|
--TEST--
|
|
|
|
mysqli_bind_result (SHOW)
|
2004-02-16 15:32:46 +00:00
|
|
|
--SKIPIF--
|
2007-10-10 10:08:29 +00:00
|
|
|
<?php
|
2006-03-30 20:43:39 +00:00
|
|
|
require_once('skipif.inc');
|
2007-10-10 10:08:29 +00:00
|
|
|
require_once('skipifemb.inc');
|
|
|
|
require_once('skipifconnectfailure.inc');
|
|
|
|
|
2004-02-16 15:32:46 +00:00
|
|
|
include "connect.inc";
|
2004-12-04 08:16:04 +00:00
|
|
|
$link = mysqli_connect($host, $user, $passwd);
|
2004-02-16 15:32:46 +00:00
|
|
|
|
|
|
|
$stmt = mysqli_prepare($link, "SHOW VARIABLES LIKE 'port'");
|
|
|
|
mysqli_execute($stmt);
|
|
|
|
|
|
|
|
if (!$stmt->field_count) {
|
|
|
|
printf("skip SHOW command is not supported in prepared statements.");
|
|
|
|
}
|
|
|
|
$stmt->close();
|
|
|
|
mysqli_close($link);
|
|
|
|
?>
|
2003-02-14 19:49:35 +00:00
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
include "connect.inc";
|
2007-10-10 10:08:29 +00:00
|
|
|
|
2003-02-14 19:49:35 +00:00
|
|
|
/*** test mysqli_connect 127.0.0.1 ***/
|
2007-10-10 10:08:29 +00:00
|
|
|
$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
|
2003-02-14 19:49:35 +00:00
|
|
|
|
|
|
|
$stmt = mysqli_prepare($link, "SHOW VARIABLES LIKE 'port'");
|
|
|
|
mysqli_execute($stmt);
|
2004-02-16 15:32:46 +00:00
|
|
|
|
2007-10-10 10:08:29 +00:00
|
|
|
mysqli_bind_result($stmt, $c1, $c2);
|
2003-02-14 19:49:35 +00:00
|
|
|
mysqli_fetch($stmt);
|
2007-10-10 10:08:29 +00:00
|
|
|
mysqli_stmt_close($stmt);
|
|
|
|
if (ini_get("unicode.semantics") && mysqli_get_server_version($link) < 50000) {
|
|
|
|
/* variables are binary */
|
|
|
|
settype($c1, "unicode");
|
|
|
|
settype($c2, "unicode");
|
|
|
|
}
|
2003-02-14 19:49:35 +00:00
|
|
|
$test = array ($c1,$c2);
|
|
|
|
|
|
|
|
var_dump($test);
|
|
|
|
|
|
|
|
mysqli_close($link);
|
2007-10-10 10:08:29 +00:00
|
|
|
print "done!";
|
2003-02-14 19:49:35 +00:00
|
|
|
?>
|
2007-10-10 10:08:29 +00:00
|
|
|
--EXPECTF--
|
2003-02-14 19:49:35 +00:00
|
|
|
array(2) {
|
|
|
|
[0]=>
|
|
|
|
string(4) "port"
|
|
|
|
[1]=>
|
2007-10-10 10:08:29 +00:00
|
|
|
string(%d) "%s"
|
|
|
|
}
|
|
|
|
done!
|
|
|
|
--UEXPECTF--
|
|
|
|
array(2) {
|
|
|
|
[0]=>
|
|
|
|
unicode(4) "port"
|
|
|
|
[1]=>
|
|
|
|
unicode(%d) "%s"
|
2003-02-14 19:49:35 +00:00
|
|
|
}
|
2007-10-10 10:08:29 +00:00
|
|
|
done!
|