Witango-Talk: SQL Question (OT)

2010-09-15 Thread Fogelson, Steve
I have an SQL question. I am using the following code: SELECT p1.P_ID, c2.Cat_ID, p1.P_Name, i3.ImageTNFileName AS TNName, c2.CPR_Seq_Number FROM categoryproducts c2, products p1 LEFT JOIN (Image i3) ON (i3.ImageTypeID=p1.P_ID) WHERE (c2.Cat_ID=180 AND p1.P_Disable IS NULL) AND

Re: Witango-Talk: SQL Question (OT)

2010-09-15 Thread Robert Garcia
Use UNION http://dev.mysql.com/doc/refman/5.0/en/union.html The second query needs to have same exact columns, just use a where on that one that will only pull rows with no images or one image. -- Robert Garcia President - BigHead Technology VP Application Development - eventpix.com 15520