You can miss out using the file (and error checking) in the code above and work directly with data as shown below.
As before $CustomList will contain a semicolon separated list of custom fields, ready to use to populate a combobox.
GSK |
$_sql="PRAGMA table_info(Custom)" $CustomCol=Sqlite("sql",$_sql) $rows = Val(CsvGet($CustomCol,"rows")) $CustomList="" $x = 1 REPEAT $x = $x + 1 $CustomList = $CustomList+CsvGet($CustomCol,"$x,2 Delim=;")+";" UNTIL $x = $rows |
As before $CustomList will contain a semicolon separated list of custom fields, ready to use to populate a combobox.