OK, this query is driving me crazy, returns too many records in CFMX and MS SQL (Query Analyzer)

SELECT     tbl_products.product_ID, tbl_products.product_Name, tbl_products.product_ShortDescription, tbl_prdtimages.prdctImage_FileName
FROM         tbl_products INNER JOIN
                      tbl_prdtimages ON tbl_products.product_ID = tbl_prdtimages.prdctImage_ProductID INNER JOIN
                      tbl_products_rel ON tbl_products.product_ID = tbl_products_rel.rel_product_id
WHERE     (tbl_products.product_OnWeb = '1') AND (tbl_products.product_ID = 7000 OR
                      tbl_products.product_ID = 6560) AND (tbl_prdtimages.prdctImage_ImgTypeID = '1')

I do not understand why. The only thing different in this query as the another query that is use within the appllication is the addition of the "OR tbl_products.product_id = 6868"

I know that I will probably not get an answer, but any help would be appreciated, even educated guesses at this point. If I take out the or clause and use either one of those product_id's I get 1 record back, this should only return 2 records, it returns 1 for id "7000" and 12 for "6868"

Damn mondays.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to