xref: /PHP-5.4/ext/mysqli/tests/018.phpt (revision 389965f1)
1--TEST--
2mysqli fetch system variables
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6require_once('skipifconnectfailure.inc');
7?>
8--FILE--
9<?php
10	require_once("connect.inc");
11
12	/*** test mysqli_connect 127.0.0.1 ***/
13	$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
14
15	if (!mysqli_query($link, "SET AUTOCOMMIT=0"))
16		printf("[001] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
17
18	if (!$stmt = mysqli_prepare($link, "SELECT @@autocommit"))
19		printf("[001] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
20
21	mysqli_stmt_bind_result($stmt, $c0);
22	mysqli_stmt_execute($stmt);
23
24	mysqli_stmt_fetch($stmt);
25
26	var_dump($c0);
27
28	mysqli_close($link);
29	print "done!";
30?>
31--EXPECT--
32int(0)
33done!