What I _really_ want is the combination of your two querys, that is,
product_name, product_description, from the product table + all the specs
related to the product from the specs table , based on the fg00914 number.

I should get 7 rows in this example

I'm using this query in a php web page that displays all that data, and it
seems better to do it with one query.

Michael



                                                                                       
                                 
                      "Michael T.                                                      
                                 
                      Babcock"                 To:       Michael Knauf/Niles 
<[EMAIL PROTECTED]>                    
                      <mbabcock@fibresp        cc:       [EMAIL PROTECTED]         
                                 
                      eed.net>                 Subject:  Re: query help                
                                 
                                                                                       
                                 
                      10/08/02 11:40 AM                                                
                                 
                                                                                       
                                 
                                                                                       
                                 




Michael Knauf/Niles wrote:

>I get 7 rows of data I don't want, then the 7 rows of data I do want...
and
>after scratching my head for awhile, I've come to the conclusion that I do
>not understand the query structure. (the query came from multiple
>suggestions in response to my last posting on this list, so clearly it
>makes sense to some of you...)
>
>
Well, you seem to be getting what you asked for ... in your SQL QUERY
... but if its not what you wanted, then describe what you _really_
want, not what you think the query will look like;

If you mean: "I want the various spec outputs for a product called
'fg00914'", then you probably just want to ask for the specs stuff and
products stuff seperately, since there's only one product (correct?) and
multiple specs (correct?).

SELECT * FROM products WHERE fg_number = "fg00914";
- returns one line
SELECT * FROM specs WHERE fg_number = "fg00914";
- returns 7 lines?

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock


Niles Audio Corporation
This mail is confidential







---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to