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

34 lines
632 B
Plaintext
Raw Normal View History

2003-02-18 00:19:49 +08:00
--TEST--
mysql_fetch_row (OO-Style)
2004-12-04 16:50:33 +08:00
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifemb.inc');
require_once('skipifconnectfailure.inc');
?>
2003-02-18 00:19:49 +08:00
--FILE--
<?php
require_once("connect.inc");
2003-02-18 00:19:49 +08:00
/*** test mysqli_connect 127.0.0.1 ***/
$mysql = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
2003-02-18 00:19:49 +08:00
$mysql->select_db($db);
2006-05-09 19:27:20 +08:00
$result = $mysql->query("SELECT DATABASE()");
2003-02-18 00:19:49 +08:00
$row = $result->fetch_row();
$result->close();
2006-05-09 19:27:20 +08:00
var_dump($row);
if ($row[0] != $db)
printf("[001] Expecting '%s' got '%s'\n", $db, $row[0]);
2003-02-18 00:19:49 +08:00
$mysql->close();
print "done!";
2003-02-18 00:19:49 +08:00
?>
--EXPECTF--
array(1) {
[0]=>
2016-11-23 05:12:07 +08:00
string(%d) "%s"
2006-05-09 19:27:20 +08:00
}
done!