« mysqli_stmt::store_result
mysqli_result::$current_field »
PHP Manual
Mysqli
mysqli_result类
mysqli_result类
(PHP 5, PHP 7)
简介
代表从一个数据库查询中获取的结果集。
更新日志
更新日志
版本
说明
5.4.0
Iterator
support was added, as
mysqli_result
now implements
Traversable
.
类摘要
mysqli_result
{
/* 属性 */
int
$
current_field
;
int
$
field_count
;
array
$
lengths
;
int
$
num_rows
;
/* 方法 */
mysqli_field_tell
(
mysqli_result
$result
) :
int
public
data_seek
(
int
$offset
) :
bool
public
fetch_all
([
int
$resulttype
= MYSQLI_NUM
] ) :
mixed
public
fetch_array
([
int
$resulttype
= MYSQLI_BOTH
] ) :
mixed
public
fetch_assoc
( ) :
array
public
fetch_field_direct
(
int
$fieldnr
) :
object
public
fetch_field
( ) :
object
public
fetch_fields
( ) :
array
public
fetch_object
([
string
$class_name
= "stdClass"
[,
array
$params
]] ) :
object
public
fetch_row
( ) :
mixed
mysqli_num_fields
(
mysqli_result
$result
) :
int
public
field_seek
(
int
$fieldnr
) :
bool
public
free
( ) :
void
mysqli_fetch_lengths
(
mysqli_result
$result
) :
array
mysqli_num_rows
(
mysqli_result
$result
) :
int
}
Table of Contents
mysqli_result::$current_field
— Get current field offset of a result pointer
mysqli_result::data_seek
— Adjusts the result pointer to an arbitrary row in the result
mysqli_result::fetch_all
— Fetches all result rows as an associative array, a numeric array, or both
mysqli_result::fetch_array
— Fetch a result row as an associative, a numeric array, or both
mysqli_result::fetch_assoc
— Fetch a result row as an associative array
mysqli_result::fetch_field_direct
— Fetch meta-data for a single field
mysqli_result::fetch_field
— Returns the next field in the result set
mysqli_result::fetch_fields
— Returns an array of objects representing the fields in a result set
mysqli_result::fetch_object
— Returns the current row of a result set as an object
mysqli_result::fetch_row
— Get a result row as an enumerated array
mysqli_result::$field_count
— Get the number of fields in a result
mysqli_result::field_seek
— Set result pointer to a specified field offset
mysqli_result::free
— Frees the memory associated with a result
mysqli_result::$lengths
— Returns the lengths of the columns of the current row in the result set
mysqli_result::$num_rows
— Gets the number of rows in a result