|
|
|
|
|
|
![]() |
#6 | |
Vagabond
|
Quote:
![]() I have it pretty much figured out, but it's in 2 queries. #1. Get all sponsors #2. Check if sponsor has the type of banners I'm looking for SELECT 3 = COUNT(*) FROM ( SELECT DISTINCT 1 FROM banners WHERE sponsor LIKE 'sponsor1' AND keyword LIKE 'horizontal' UNION ALL SELECT DISTINCT 1 FROM banners WHERE sponsor LIKE 'sponsor1' AND keyword LIKE 'vertical' UNION ALL SELECT DISTINCT 1 FROM banners WHERE sponsor LIKE 'sponsor1' AND (keyword LIKE 'small' OR keyword LIKE 'button') ) AS tbl 3 is how many different banners I'm looking for. I just wish I could get rid of step #1 and just make it into one query. |
|
![]() |
![]() |
|
|