SQLite3Result
在线手册:中文  英文

SQLite3Result::columnType

(PHP 5 >= 5.3.0)

SQLite3Result::columnTypeReturns the type of the nth column

说明

public int SQLite3Result::columnType ( int $column_number )

Returns the type of the column identified by column_number.

参数

column_number

The numeric zero-based index of the column.

返回值

Returns the data type index of the column identified by column_number (one of SQLITE3_INTEGER, SQLITE3_FLOAT, SQLITE3_TEXT, SQLITE3_BLOB, or SQLITE3_NULL).


SQLite3Result
在线手册:中文  英文

用户评论:

phpnotes at carwash dot org (2011-11-22 10:44:33)

This function never returns any value other than 5, indicating SQLITE3_NULL. SQLite 3 doesn't have column types, it has column affinities. Different rows of the same table (and rows resulting from a SELECT) can hold values of different types. Therefore this API cannot return anything useful, and the method appears to be using SQLITE3_NULL as a placeholder.
The function in useless and should be removed or marked as deprecated in future releases, so as not to give any programmer the false idea that the values returned are useful.

易百教程