SELECT p.webid, trim(p.Title) as Title, REPLACE(trim(p.Title),' ', '-') as CleanTitle, p.Prize, p.chances, p.Sponsor, p.Prize_value, p.URL, q.type as Entry, p.enter, datediff(p.Date, curdate()) as DateAdded, p.Expire as Expire_IN, datediff(Expire, curdate()) as Expire , concat(month(p.Expire),'-',day(p.Expire), '-', year(p.Expire)) as EndDate, concat(month(p.Date),'-',day(p.Date), '-', year(p.Date)) as Date, p.prizecat, p.type_form, p.chances, p.image_thumb, p.image, p.instant, p.blog, ifnull(p.Featured,'') as Featured, p.votes AS user_rating, 'sweepstakes' as OfferText, ifnull(FavTest.webid, '') as MyFavTest, (Select Name from ItemsCategories xC Inner join categories yC on (xC.categoryid = yC.categoryid) where p.webid = xC.webid limit 1) as CatTitle , 0 as Fav, p.domain FROM prizetune_website p Inner join winprizes_types q on (p.Entry = q.id and q.group_id = '1' and 4=4) Left Join prizetune_saved FavTest on (FavTest.webid = p.webid and FavTest.userId=0) Where ( p.Expire>='2012-05-25' AND p.status='u' AND p.exstatus='y' and p.OfferType = 1 And p.webid in (Select x.webid from ItemsCategories x where ( p.webId = x.WebId and x.CategoryID in (11))) and ifnull(p.Featured,'') = '') Order by YEAR(p.Date) DESC, MONTH(p.Date) DESC, DAY(p.Date) DESC, p.webid desc
You are currently not logged in (oh no!). Log in or join to take advantage of features such as saving favorite offers, tracking entries, and our very own PowerSweeper software.