Cross reference query help

From: Date: Sat, 06 Feb 2010 15:33:47 +0000
Subject: Cross reference query help
Groups: php.db 
Request: Send a blank email to php-db+get-46862@lists.php.net to get a copy of this message
The following is a query I am working on today. I need help tweaking on it. What I am trying to get for results from the query are where there are rows in either table, not all 3 tables linked together. In other words I am trying to INNER JOIN these two pairs of tables for possible results: store_product_profile and paypal_cart_info OR store_product_profile and mail_order_cart SELECT store_product_profile.product_name FROM ( store_product_profile INNER JOIN paypal_cart_info ON store_product_profile.reference = paypal_cart_info.itemnumber ) INNER JOIN mail_order_cart ON store_product_profile.reference = mail_order_cart.store_product_profile_reference WHERE store_product_profile.discontinued =0 AND store_product_profile.reference =7 Finally I need help with the GROUP BY syntax also. I only want the name of the product once, not if it was in several previous purchases. Any help is appreciated. Ron

« previous php.db (#46862) next »