mysqli_result
class mysqli_result implements IteratorAggregate (View source)
Represents the result set obtained from a query against the database.
Implements Traversable since 5.4
Properties
| int | $current_field | ||
| int | $field_count | ||
| array|null | $lengths | ||
| int | $num_rows | ||
| mixed | $type |
Methods
Frees the memory associated with a result
Frees the memory associated with a result
Adjusts the result pointer to an arbitrary row in the result
Returns the next field in the result set
Returns an array of objects representing the fields in a result set
Fetch meta-data for a single field
Fetches all result rows as an associative array, a numeric array, or both
Fetch the next row of a result set as an associative, a numeric array, or both
Fetch the next row of a result set as an associative array
Fetch the next row of a result set as an object
Fetch the next row of a result set as an enumerated array
Fetch a single column from the next row of a result set
Set result pointer to a specified field offset
Frees the memory associated with a result
Retrieve an external iterator
Details
__construct(mysqli $mysql, int $result_mode = MYSQLI_STORE_RESULT)
Constructor (no docs available)
void
close()
Frees the memory associated with a result
void
free()
Frees the memory associated with a result
bool
data_seek(int $offset)
Adjusts the result pointer to an arbitrary row in the result
object|false
fetch_field()
Returns the next field in the result set
array
fetch_fields()
Returns an array of objects representing the fields in a result set
object|false
fetch_field_direct(int $index)
Fetch meta-data for a single field
array
fetch_all(int $mode = MYSQLI_NUM)
Fetches all result rows as an associative array, a numeric array, or both
array|false|null
fetch_array(int $mode = MYSQLI_BOTH)
Fetch the next row of a result set as an associative, a numeric array, or both
array|false|null
fetch_assoc()
Fetch the next row of a result set as an associative array
object|false|null
fetch_object(T> $class = 'stdClass', array $constructor_args = [])
Fetch the next row of a result set as an object
Fetches one row of data from the result set and returns it as an object, where each property represents the name of the result set's column. Each subsequent call to this function will return the next row within the result set, or null if there are no more rows.
array|false|null
fetch_row()
Fetch the next row of a result set as an enumerated array
string|int|float|false|null
fetch_column(int $column = 0)
Fetch a single column from the next row of a result set
field_seek(int $index)
Set result pointer to a specified field offset
void
free_result()
Frees the memory associated with a result
Traversable
getIterator()
Retrieve an external iterator