RE: Witango-Talk: SQL Question - OT

2011-04-06 Thread Robert Shubert
[mailto:stevefogel...@askics.net] Sent: Tuesday, April 05, 2011 11:40 PM To: Witango-Talk@witango.com Subject: Witango-Talk: SQL Question - OT SELECT P_Price1, COUNT(*) AS ProductCount FROM categoryproducts c2, products p1 WHERE (c2.Cat_ID=32 AND p1.P_Disable IS NULL) AND (c2.P_ID=p1.P_ID) GROUP BY p1

Witango-Talk: SQL Question - OT

2011-04-05 Thread Fogelson, Steve
SELECT P_Price1, COUNT(*) AS ProductCount FROM categoryproducts c2, products p1 WHERE (c2.Cat_ID=32 AND p1.P_Disable IS NULL) AND (c2.P_ID=p1.P_ID) GROUP BY p1.P_Price1; Price1 Qty 2.99 1 5.99 2 6.49 1 6.99 1 7.49 1 7.99 5 8.99 2 9.99 2 14.99 1 65.99 1 SELECT

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