SQLite3Result::reset
(PHP 5 >= 5.3.0)
SQLite3Result::reset — Resets the result set back to the first row
Description
public bool SQLite3Result::reset
( void
)
Resets the result set back to the first row.
Parameters
This function has no parameters.
Return Values
Returns TRUE
if the result set is successfully reset
back to the first row, FALSE
on failure.
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Расширения для работы с базами данных
- Расширения для работы с базами данных отдельных производителей
- SQLite3
- Функция SQLite3Result::columnName() - Returns the name of the nth column
- Функция SQLite3Result::columnType() - Returns the type of the nth column
- Функция SQLite3Result::fetchArray() - Fetches a result row as an associative or numerically indexed array or both
- Функция SQLite3Result::finalize() - Closes the result set
- Функция SQLite3Result::numColumns() - Returns the number of columns in the result set
- Функция SQLite3Result::reset() - Resets the result set back to the first row
Коментарии
I found some odd behavior with this function that isn't mentioned anywhere in the documentation.
If you perform an "INSERT" using SQLite3::query(), it will return an SQLite3Result object. If you then call reset() on this object, it will repeat the INSERT query, creating a duplicate entry in the database.