Ok this is my issue, I have a row called status and in the example below, it is shown as a.status
The system has the numbers from 1 to 6 and I need to say only show ads that match if there status is 2 - 3 or 5
However I have tried everything I know of to get it to work from AND a.status LIKE "2%3%5" but that did not work I tried placing an OR in it, but saw it screwed the whole thing...
So I am kinda at a loss I know it has to be possible but just don't know how.
<?php
SELECT
c.id as id,
c.catid as catid,
c.onoff as onoff,
c.cid as cid,
u.sid as sid,
u.onoff as sonoff,
m.uid as stationuid,
m.sid as stationid,
m.minprice as stationminprice,
m.maxprice as stationmaxprice,
a.id as advertisersid,
a.uid as advertisersuid,
a.status as status,
a.minprice as advertisersminprice,
a.maxprice as advertisersmaxprice,
a.audiofile as advertisersaudiofile,
AVG((m.maxprice)/(a.minprice)) as avg
FROM tbl_radio_ad_network_categories_onoff c
LEFT OUTER JOIN tbl_radio_ad_network_categories_onoff u ON u.catid = c.catid
LEFT OUTER JOIN tbl_radio_ad_network_stations m ON u.sid = m.sid
LEFT OUTER JOIN tbl_radio_ad_network_campaign a ON c.cid = a.id AND a.minprice <> m.minprice AND a.maxprice <> m.maxprice
WHERE c.cid NOT LIKE "0" AND u.sid NOT LIKE "0" AND c.onoff NOT LIKE "0" AND u.onoff NOT LIKE "0" AND a.status = "2" OR "3" AND u.sid = "4" AND c.cid NOT LIKE "27"
?>

Hi Russell, You could use IN
Hi Russell,
You could use IN with this scenario...
WHERE a.status IN (2,3,5)Cheers,
David.