php-src/ext/mysqli/tests/018.phpt

33 lines
702 B
Plaintext
Raw Normal View History

2003-02-12 00:46:29 +00:00
--TEST--
mysqli fetch system variables
2004-12-04 08:50:33 +00:00
--SKIPIF--
<?php
require_once('skipif.inc');
2007-10-10 10:07:08 +00:00
require_once('skipifconnectfailure.inc');
?>
2003-02-12 00:46:29 +00:00
--FILE--
<?php
require_once("connect.inc");
2007-10-10 10:07:08 +00:00
2003-02-12 00:46:29 +00:00
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
2003-02-12 00:46:29 +00:00
2007-10-10 10:07:08 +00:00
if (!mysqli_query($link, "SET AUTOCOMMIT=0"))
printf("[001] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
2003-02-12 00:46:29 +00:00
2007-10-10 10:07:08 +00:00
if (!$stmt = mysqli_prepare($link, "SELECT @@autocommit"))
printf("[001] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
2003-02-12 00:46:29 +00:00
2007-10-10 10:07:08 +00:00
mysqli_bind_result($stmt, $c0);
2003-02-12 00:46:29 +00:00
mysqli_execute($stmt);
mysqli_fetch($stmt);
var_dump($c0);
mysqli_close($link);
2007-10-10 10:07:08 +00:00
print "done!";
2003-02-12 00:46:29 +00:00
?>
--EXPECT--
int(0)
2007-10-10 10:07:08 +00:00
done!