blob: 60170a727e060d46fec4ac7ebe18db1f1116bb63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
--TEST--
mysqli fetch user variable
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
require_once("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
if (!mysqli_query($link, "SET @dummy='foobar'"))
printf("[001] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
if (!$stmt = mysqli_prepare($link, "SELECT @dummy"))
printf("[002] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_stmt_bind_result($stmt, $dummy);
mysqli_stmt_execute($stmt);
mysqli_stmt_fetch($stmt);
var_dump($dummy);
mysqli_stmt_close($stmt);
mysqli_close($link);
print "done!";
?>
--EXPECT--
string(6) "foobar"
done!
|