Hello,

I'm new to this list, and relatively new to SQL (well more rusty then new).
Anyhow, I really need some assistance with the following query. When I made
it up it worked fine, but then during my testing I deleted all of the info
from the gallery_info table and that blew this query outta the water. I
tried subsequently using joins (that I never was good at) and sub queries
and neither seemed to work. With the sub query I kept getting an error as
the MySQL version is 4.0.15 (prior to the 4.1 release where I believe the
sub queries were brought in). Any help at all would be so greatly
appreciated. This really needs to run as one query as so much of the
subsequent code relies upon it.

thanks
Ed Peterson


SELECT product_info.PRODINFO_ID, product_info.ARTIST_ID,
product_info.GALLERY_ID, product_info.SUPPLIER_ID,
product_info.PRODINFO_NAME, product_info.PRODINFO_COST,
product_info.PRODINFO_SH_DESC
FROM product_info, artist_info, gallery_info, supplier_info
WHERE PRODINFO_DEL = 0 AND PRODINFO_SUSPEND_DATE = '0000-00-00 00:00:00' AND
((artist_info.ARTIST_ID = product_info.ARTIST_ID AND
artist_info.ARTIST_SUSPEND_DATE = '0000-00-00 00:00:00' AND
artist_info.ARTIST_DEL = 0 ) OR ((gallery_info.GALLERY_ID =
product_info.GALLERY_ID AND gallery_info.GALLERY_SUSPEND_DATE = '0000-00-00
00:00:00' AND gallery_info.GALLERY_DEL = 0) OR (supplier_info.SUPPLIER_ID =
product_info.SUPPLIER_ID AND supplier_info.SUPPLIER_SUSPEND_DATE =
'0000-00-00 00:00:00' AND supplier_info.SUPPLIER_DEL = 0)))
GROUP BY product_info.PRODINFO_ID


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to