How can I get metadata / constraints (primary key and "null allowed" in particular) for each column in a SQLite v2.8 table using PHP5 (like mysql_fetch_field for MySql)?
sqlite_fetch_column_types
(OO: $db->fetchColumnTypes
) only gets column name and datatype:
http://dk.php.net/manual/en/function.sqlite-fetch-column-types.php
SQLITE_MASTER has the info - but not as a variable. Example:
SELECT name FROM SQLITE_MASTER;
... SQLITE_MASTER only outputs an array with this structure (v2.8):
[type] => table
[name] => foo
[tbl_name] => foo
[rootpage] => 3
[sql] => CREATE TABLE foo ( id INTEGER PRIMARY KEY, name CHAR(255) )
(And what is "rootpage"?)