The problem with the permanently locked database file when using this function still seems to exist in PHP 5.0.3 (tested on win32).
However, you can get all the information you need about the fields of a table by using this query:
PRAGMA table_info(name_of_your_table);