v5:userguide:learn_dictionary:metacolumns
This is an old revision of the document!
MetaColumns
The metaColumns method returns an array of adoFieldObject object that represents the attributes of the columns of a specified table.
$m = $db->metaColumns('my_table'); print_r($m);
adoFieldObject Object ( [name] => actno [max_length] => 8 [type] => INT ) adoFieldObject Object ( [name] => actname [max_length] => 30 [type] => VARCHAR )
Note that the type of the data returned is the actualType. In order to retrieve the metaType , the value must be passed to:
$db->metaType($object->type);
For example, in the example above, the actname field is of a type VARCHAR . If we pass this to metaType()
, it returns the value C
metaColumnNames
This method returns just the column names from the table.
v5/userguide/learn_dictionary/metacolumns.1458093990.txt.gz · Last modified: 2017/04/21 11:40 (external edit)