Finally...
How can I filter on products...
(there's a 1/0 field in the products table, that flags if the product
is ethically made.)
how can I add a 'WHERE product.ethical = '1'?

I tried just before the first inner join, but I got an error...

Here's my query:

                SELECT distinct products.id,
                                                products.title,
                                                brands.title as brandTitle,
                                                products.thumb2,
                                                products.price,
                                                products.salePrice,
                                                products.saleStatus
                FROM products
                        inner join stock
                                on stock.productId = products.id
                                and stock.count > 0
                        inner join prodcatmatch
                                on prodcatmatch.product = products.id
                        inner join categories as parent
                                on parent.id = stock.size
                                and parent.gender = '1'
                                and parent.type = '2'
                        inner join categories as child
                                on child.type = '5'
                        inner join brands
                                on brands.id = products.brand
                order by products.id

____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
      Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

Reply via email to