Connecting Tech Pros Worldwide Help | Site Map

MySQL SHOW TABLES

Newbie
 
Join Date: May 2009
Posts: 21
#1: Jun 15 '09
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

Expand|Select|Wrap|Line Numbers
  1. $data = mysql_query("SHOW TABLES FROM feather WHERE site CONTAINS '$entry'") 
  2. or die(mysql_error());
code green's Avatar
Expert
 
Join Date: Mar 2007
Location: England
Posts: 1,076
#2: Jun 16 '09

re: MySQL SHOW TABLES


There may be a reason, but if you are trying to do something like this, then your database design has gone horribly wrong
Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#3: Jun 17 '09

re: MySQL SHOW TABLES


Yeah, please explain why you have realized that you need to do this.

P.S Yes your attempt is also wrong.
Reply