ArizonaJohn Posted June 15, 2009 Share Posted June 15, 2009 Hello, In a MySQL database called "feather," I have a lot of tables, and each table has a column called "site." I'm trying to show all tables that contain a record equal to $entry in the column "site." How do I do that? I have some code below but I doubt it works. Thanks in advance, John $data = mysql_query("SHOW TABLES FROM feather WHERE site CONTAINS '$entry'") or die(mysql_error()); Quote Link to comment https://forums.phpfreaks.com/topic/162269-mysql-show-tables/ Share on other sites More sharing options...
PFMaBiSmAd Posted June 15, 2009 Share Posted June 15, 2009 Why do you have a lot of tables that you would like to search at one time? That implies that your table design is not normalized and makes searching for same information across the tables directly impossible. What are these tables are being used for? Edit: Never mind, I just noticed your username. You were previously told that creating separate tables for each topic would not work out. You should not be surprised at this point that you cannot directly search through the different tables and find the information you want. Quote Link to comment https://forums.phpfreaks.com/topic/162269-mysql-show-tables/#findComment-856456 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.