I need to have a list of tables in MySQL, that don`t have a column 'created' or 'modified', so I can add them if non existant. How can I achieve this?
Thanks in advance for any help / hint.
I need to have a list of tables in MySQL, that don`t have a column 'created' or 'modified', so I can add them if non existant. How can I achieve this?
Thanks in advance for any help / hint.
Query INFORMATION_SCHEMA database for this.
http://dev.mysql.com/doc/refman/5.1/en/information-schema.html
You can do this from PHP. Connect to the database and browse the mysql table. It will have all table definitions, then run DESCRIBE
on each table, that will get you the structure.
I can give you some code examples if you like