mirror of
https://github.com/php/php-src.git
synced 2024-10-01 14:56:10 +00:00
a4cd950dc8
verbose explanation of changes: - take connection parameter from connect.inc - use proper UEXPECTF - have 'print "done!"' or similar at the end to detect crashes - whitespace changes where needed - take care of portability: PHP 5 vs. PHP 5, MySQL 4.1 - 6.0 - understand return value checking as sometime that makes you type more when you write but makes you happy when you debug
33 lines
498 B
PHP
33 lines
498 B
PHP
--TEST--
|
|
resultset constructor
|
|
--SKIPIF--
|
|
<?php require_once('skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
include "connect.inc";
|
|
|
|
$mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
|
|
|
|
$mysql->real_query("SELECT 'foo' FROM DUAL");
|
|
|
|
$myresult = new mysqli_result($mysql);
|
|
|
|
$row = $myresult->fetch_row();
|
|
$myresult->close();
|
|
$mysql->close();
|
|
|
|
var_dump($row);
|
|
print "done!";
|
|
?>
|
|
--EXPECTF--
|
|
array(1) {
|
|
[0]=>
|
|
string(3) "foo"
|
|
}
|
|
done!
|
|
--UEXPECTF--
|
|
array(1) {
|
|
[0]=>
|
|
unicode(3) "foo"
|
|
}
|
|
done!
|