sqlite_current
SQLiteResult::current
SQLiteUnbuffered::current
(PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)
sqlite_current -- SQLiteResult::current -- SQLiteUnbuffered::current — Fetches the current row from a result set as an array
Opis
$result
[, int $result_type = SQLITE_BOTH
[, bool $decode_binary = true
]] )Styl obiektowy (method):
$result_type = SQLITE_BOTH
[, bool $decode_binary = true
]] )$result_type = SQLITE_BOTH
[, bool $decode_binary = true
]] )sqlite_current() is identical to sqlite_fetch_array() except that it does not advance to the next row prior to returning the data; it returns the data from the current position only.
Parametry
-
result -
The SQLite result resource. This parameter is not required when using the object-oriented method.
-
result_type -
Opcjonalny parametr
result_typeprzyjmuje wartości stałych i określa jak indeksowane będą zwracane wartości. UżywającSQLITE_ASSOCzwrócone zostaną tylko indeksy asocjacyjne (nazwy pól), podczas gdySQLITE_NUMzwróci tylko indeksy numeryczne (numery pól).SQLITE_BOTHzwróci i indeksy asocjacyjne i numeryczne.SQLITE_BOTHjest domyślną wartością dla tej funkcji. -
decode_binary -
Gdy parametr
decode_binaryzostanie ustawiony naTRUE(domyślnie), PHP zdekoduje kodowanie binarne, któremu zostały poddane dane, jeśli były kodowane przy użyciu funkcji sqlite_escape_string(). Zazwyczaj należy pozostawić domyślną wartość tego parametru, chyba że baza jest współużytkowana przez różne aplikacje.
Zwracane wartości
Returns an array of the current row from a result set; FALSE if the
current position is beyond the final row.
Wielkość liter w nazwach kolumn zwróconych przez
SQLITE_ASSOC i SQLITE_BOTH zostaną
przetworzone zależnie od ustawienia opcji konfiguracji
sqlite.assoc_case.
Zobacz też:
- sqlite_seek() - Seek to a particular row number of a buffered result set
- sqlite_next() - Seek to the next row number
- sqlite_fetch_array() - Fetches the next row from a result set as an array
