sqlite_current

SQLiteResult::current

SQLiteUnbuffered::current

(PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)

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

Opis

sqlite_current ( resource $result [, int $result_type = SQLITE_BOTH [, bool $decode_binary = TRUE ]] ) : array

Styl obiektowy (method):

SQLiteResult::current ([ int $result_type = SQLITE_BOTH [, bool $decode_binary = TRUE ]] ) : array
SQLiteUnbuffered::current ([ int $result_type = SQLITE_BOTH [, bool $decode_binary = TRUE ]] ) : array

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

Gdy 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.

Zobacz też:

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top