SQLite Funkcje
PHP Manual

sqlite_current

SQLiteResult->current

SQLiteUnbuffered->current

(PHP 5, PECL sqlite:1.0-1.0.3)

sqlite_current -- SQLiteResult->current -- SQLiteUnbuffered->currentFetches the current row from a result set as an array

Opis

array sqlite_current ( resource $result [, int $result_type [, bool $decode_binary ]] )

Object oriented style (method):

SQLiteResult
array current ([ int $result_type [, bool $decode_binary ]] )
SQLiteUnbuffered
array current ([ int $result_type [, bool $decode_binary ]] )

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_type przyjmuje wartości stałych i określa jak indeksowane będą zwracane wartości. Używając SQLITE_ASSOC zwrócone zostaną tylko indeksy asocjacyjne (nazwy pól), podczas gdy SQLITE_NUM zwróci tylko indeksy numeryczne (numery pól). SQLITE_BOTH zwróci i indeksy asocjacyjne i numeryczne. SQLITE_BOTH jest domyślną wartością dla tej funkcji.

decode_binary

Kiedy parametr decode_binary zostanie ustawiony na TRUE (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.

Patrz także


SQLite Funkcje
PHP Manual