ID: 50707 Updated by: [email protected] Reported By: cagret at gmail dot com -Status: Open +Status: Bogus Bug Type: SQLite related Operating System: Win xp pro PHP Version: 5.3.1 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The value returned by sqlite3_column_type() is only meaningful if no type conversions have occurred as described below. After a type conversion, the value returned by sqlite3_column_type() is undefined. Previous Comments: ------------------------------------------------------------------------ [2010-01-09 12:48:35] cagret at gmail dot com Description: ------------ Sqlite3Result->columnType() always returns SQLITE3_NULL. Table structure: CREATE TABLE IF NOT EXISTS Test (Id int primary key, Name varchar(50)); Reproduce code: --------------- $query = sprintf('SELECT * FROM %s', $table); $result = $db->query($query); $columns = array(); $numcols = $result->numColumns(); for ($i = 0; $i < $numcols; $i++) { $colname = $result->columnName($i); $coltype = $result->columnType($i); } $coltype == 5 (SQLITE3_NULL) for each column. Expected result: ---------------- SQLITE3_INTEGER or SQLITE3_TEXT Actual result: -------------- SQLITE3_NULL ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50707&edit=1
