DATA Methods
Database functions
select(), fetch(), write(), update(), delete(), execute(), tables(), fields()Requests and temporary storage
request(), cookie(), session(), config(), store()Formatting data
encode(), decode(), json(), text(), date(), weekday(), month()Template data
content(), parents(), directory()
fields()
Get field-names and field-config of database table. Config values will only be available for imported tables. The table in our example below does exist in our database but has not been imported into the system.
array fields( string table [, bool config = false ])
Return
List of fields.
Parameter
Description
tableThe table name.
configIf TRUE function will return backend config values of this table. This will only work on imported tables.
Get table fields
$DATA->fields("data_api_test")
RETURN: ARRAY [6]
Get table config
$DATA->fields("data_api_test", true)
RETURN: ARRAY [0]