PHP 5.4.33 Released

SQLite3Result::columnType

(PHP 5 >= 5.3.0)

SQLite3Result::columnTypeRetourne le type d'une colonne

Description

public int SQLite3Result::columnType ( int $column_number )

Retourne le type de la colonne identifiée par le paramètre column_number.

Liste de paramètres

column_number

Le numéro de la colonne, en commançant par 0.

Valeurs de retour

Retourne le type de données de la colonne identifiée par column_number (cela peut être une des constantes suivantes : SQLITE3_INTEGER, SQLITE3_FLOAT, SQLITE3_TEXT, SQLITE3_BLOB, ou SQLITE3_NULL).

add a note add a note

User Contributed Notes 1 note

up
2
phpnotes at carwash dot org
2 years ago
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.
To Top