Jump to content

MySQL SHOW TABLES


ArizonaJohn

Recommended Posts

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());

 

Link to comment
https://forums.phpfreaks.com/topic/162269-mysql-show-tables/
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/162269-mysql-show-tables/#findComment-856456
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.