Looping through TABLES for given field name not records
Posted: Sat Sep 18, 2010 7:13 pm
this might sound like a weird question but the answer would make my life a whole lot easier.
I am writing a CMS and certain MySQL tables are linked to PHP classes (as the norm), but what I want to do is to add a particular 'Flag' to certain tables to show that the records within can be used to build menus, so 'Pages' can be a menu, 'Users' can be a sub menu 'products' can be a menu, but 'user_address' wouldnt, once I can see that a table could contain a record named 'is_menu'
so it would be something like:
SHOW TABLES WHERE COLUMN LIKE %is_menu%
Ive tried using %is_menu% , vis_menu% & is_menu and none give a return value (using sing;e quotes of course!),
any help would be apprectiated.
Jimmy
I am writing a CMS and certain MySQL tables are linked to PHP classes (as the norm), but what I want to do is to add a particular 'Flag' to certain tables to show that the records within can be used to build menus, so 'Pages' can be a menu, 'Users' can be a sub menu 'products' can be a menu, but 'user_address' wouldnt, once I can see that a table could contain a record named 'is_menu'
so it would be something like:
SHOW TABLES WHERE COLUMN LIKE %is_menu%
Ive tried using %is_menu% , vis_menu% & is_menu and none give a return value (using sing;e quotes of course!),
any help would be apprectiated.
Jimmy