2003-02-18 00:19:49 +08:00
|
|
|
--TEST--
|
2007-07-13 04:55:12 +08:00
|
|
|
mysql_fetch_row (OO-Style)
|
2004-12-04 16:50:33 +08:00
|
|
|
--SKIPIF--
|
2009-05-28 22:11:41 +08:00
|
|
|
<?php
|
|
|
|
require_once('skipif.inc');
|
2007-08-09 16:41:12 +08:00
|
|
|
require_once('skipifemb.inc');
|
|
|
|
require_once('skipifconnectfailure.inc');
|
|
|
|
?>
|
2003-02-18 00:19:49 +08:00
|
|
|
--FILE--
|
|
|
|
<?php
|
2009-10-20 04:07:25 +08:00
|
|
|
require_once("connect.inc");
|
2007-07-13 04:55:12 +08:00
|
|
|
|
2003-02-18 00:19:49 +08:00
|
|
|
/*** test mysqli_connect 127.0.0.1 ***/
|
2009-09-24 20:51:03 +08:00
|
|
|
$mysql = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
|
2003-02-18 00:19:49 +08:00
|
|
|
|
2007-07-13 04:55:12 +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();
|
2004-12-04 16:16:04 +08:00
|
|
|
|
2006-05-09 19:27:20 +08:00
|
|
|
var_dump($row);
|
2009-09-24 20:51:03 +08:00
|
|
|
if ($row[0] != $db)
|
|
|
|
printf("[001] Expecting '%s' got '%s'\n", $db, $row[0]);
|
2003-02-18 00:19:49 +08:00
|
|
|
|
|
|
|
$mysql->close();
|
2007-07-13 04:55:12 +08:00
|
|
|
print "done!";
|
2003-02-18 00:19:49 +08:00
|
|
|
?>
|
2006-09-26 21:06:13 +08:00
|
|
|
--EXPECTF--
|
2007-07-13 04:55:12 +08:00
|
|
|
array(1) {
|
|
|
|
[0]=>
|
2016-11-23 05:12:07 +08:00
|
|
|
string(%d) "%s"
|
2006-05-09 19:27:20 +08:00
|
|
|
}
|
2018-10-15 10:33:09 +08:00
|
|
|
done!
|