xref: /PHP-5.3/ext/mysqli/tests/049.phpt (revision eb0e09f5)
1--TEST--
2mysql_fetch_row (OO-Style)
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6require_once('skipifemb.inc');
7require_once('skipifconnectfailure.inc');
8?>
9--FILE--
10<?php
11	require_once("connect.inc");
12
13	/*** test mysqli_connect 127.0.0.1 ***/
14	$mysql = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
15
16	$mysql->select_db($db);
17	$result = $mysql->query("SELECT DATABASE()");
18	$row = $result->fetch_row();
19	$result->close();
20
21	var_dump($row);
22	if ($row[0] != $db)
23		printf("[001] Expecting '%s' got '%s'\n", $db, $row[0]);
24
25	$mysql->close();
26	print "done!";
27?>
28--EXPECTF--
29array(1) {
30  [0]=>
31  %unicode|string%(%d) "%s"
32}
33done!