View Single Post
Old 07-16-2004, 02:00 PM  
Varius
Confirmed User
 
Industry Role:
Join Date: Jun 2004
Location: New York, NY
Posts: 6,890
Ok I think I've almost got it.

I need a way though to specify WHERE (month !=12 AND year !=2004) .....anyone ???

ie.

month=5, year=2004 * should come up
month=12, year=2002 * should come up
month=12, year=2004 * shouldn't come up

Right now using WHERE (month !=12 AND year !=2004), none of the above return rows.

If I can get the above into a $where, the other query will work like this:

SELECT t1.campaign_id, t2.revenue FROM table1 t1 LEFT JOIN table2 t2 ON t1.campaign_id=t2.campaign_id WHERE t1.uid=851 AND ((t2.year=2004 AND t2.month=12) OR t2.campaign_id IS NULL OR $where)
Varius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote