SQLite3Result::fetchArray

(PHP 5 >= 5.3.0, PHP 7)

SQLite3Result::fetchArray Fetches a result row as an associative or numerically indexed array or both

说明

public SQLite3Result::fetchArray ([ int $mode = SQLITE3_BOTH ] ) : array

Fetches a result row as an associative or numerically indexed array or both. By default, fetches as both.

参数

mode

Controls how the next row will be returned to the caller. This value must be one of either SQLITE3_ASSOC, SQLITE3_NUM, or SQLITE3_BOTH.

  • SQLITE3_ASSOC: returns an array indexed by column name as returned in the corresponding result set

  • SQLITE3_NUM: returns an array indexed by column number as returned in the corresponding result set, starting at column 0

  • SQLITE3_BOTH: returns an array indexed by both column name and number as returned in the corresponding result set, starting at column 0

返回值

Returns a result row as an associatively or numerically indexed array or both. Alternately will return FALSE if there are no more rows.

The types of the values of the returned array are mapped from SQLite3 types as follows: integers are mapped to integer if they fit into the range PHP_INT_MIN..PHP_INT_MAX, and to string otherwise. Floats are mapped to float, NULL values are mapped to null, and strings and blobs are mapped to string.

相关文章
php cubrid mysql 兼容性函数 fetch a result row as an associative array a numeric array or bothphp ibm db2 函数 returns an array indexed by column position representing a row in a result setphp ibm db2 函数 returns an array indexed by column name representing a row in a result setphp ibm db2 函数 returns an array indexed by both column name and position representing a row in a result setphp frontbase 函数 fetch a result row as an associative array a numeric array or bothphp frontbase 函数 fetch a result row as an associative arrayphp ingres 函数 fetch a row of result into an associative arrayphp maxdb 函数 fetch a result row as an associative a numeric array or bothphp maxdb 函数 fetch a result row as an associative arrayphp mssql 函数 fetch a result row as an associative array a numeric array or bothphp mssql 函数 returns an associative array of the current row in the resultphp sqlite 函数 fetches the current row from a result set as an arrayphp sqlite 函数 fetches all rows from a result set as an array of arraysphp sqlite 函数 fetches the next row from a result set as an arrayphp sqlite 函数 fetches the next row from a result set as an objectphp sybase 函数 fetch a result row as an associative arrayphp mysqli result fetches all result rows as an associative array a numeric array or bothphp mysqli result fetch a result row as an associative a numeric array or bothphp mysqli result fetch a result row as an associative arrayphp sqlite3result fetches a result row as an associative or numerically indexed array or both
关注编程学问公众号