If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Select Tables????????

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-12-04, 07:02
torn torn is offline
Registered User
 
Join Date: Jun 2004
Posts: 1
Angry Select Tables????????

Hi

I am quite new to this, just wanted to know...

I have a group of tables, and I would like to use a select query(or any way it can be done) to give me a list of the tables which contain a certain value anywhere in the table, or in a specific column within the table.

So, if I have a table for each of 10 people named by the persons name. And in each table is a list of cars that this person owns. How would I ask MySQL which people own a porche?

Thanks
Jonathan
Reply With Quote
  #2 (permalink)  
Old 07-13-04, 10:42
guelphdad guelphdad is offline
Registered User
 
Join Date: Mar 2004
Posts: 440
show how your tables are laid out and give an example of what you have tried and failed to get working.

Also anywhere in a table and in a specific column is two entirely different things. the latter is much easier to do. the former can be done but not witout naming all the columns and what criteria would be met in those columns.
Reply With Quote
  #3 (permalink)  
Old 07-13-04, 11:27
Steve T. Steve T. is offline
Registered User
 
Join Date: Sep 2003
Location: So. Cal. USA
Posts: 142
I'm a newbie but wouldn't it be something like

SELECT ownername FROM carclubtable WHERE car=$cartype;

That's my guess, anyway, but you'll end up with 5 Jonathans if Jonathan owns 5 porsches.
--ST
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On