Closed michaelward82 closed 11 years ago
This can be done with a raw query in MySQL: SHOW COLUMNS FROM table_name
I am not sure about other databases and that would be the danger of implementing anything specific - different vendors provide differing methods for accessing this information.
I would like to be able to iterate over $_POST data, assigning data to a table row from any key that matches a DB column name.
At the moment, I cannot find any way to see if a database column exists or not (within the structure of Idiorm or Paris).
Is there any way to retrieve a list of column names for a table or model from Idiorm or Paris?
I'd be willing to help implement a solution if there isn't a way, should there be a wish for a property or function that lists the column names for a table.