SELECT (Select count(*) from winprizes_comments wc WHERE wc.prizeid = p.webid) as count,p.webid, trim(p.Title) as Title, REPLACE(REPLACE(trim(p.Title),' ', '-'),'%','%25') as CleanTitle, p.Prize, p.chances, p.Sponsor, p.OfferType as OfferTypeID, 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, Saved.eventId, Saved.clickDate, Saved.endDate, Saved.status, Saved.clicks, 0 as Now 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) Left Join (Select T.eventId,PE.userId,PE.webId,PE.clickDate, PE.endDate, PE.status, PE.clicks From prizetune_event PE inner join ( SELECT Max(EventId) eventId FROM prizetune_event where userId=0 Group by userId,webId ) T on PE.eventid = T.eventid) as Saved on (Saved.webid = p.webid and Saved.userid =0) Where ( p.Expire>='2018-10-18' 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 (42))) and ifnull(p.Featured,'') = '') Order by YEAR(p.Date) DESC, MONTH(p.Date) DESC, DAY(p.Date) DESC, p.webid desc


Sort:
Type:
Status:


Directory is empty...
 




-->





Home | Join | Login | Support / Contact | About | Privacy Policy | Login Publisher | Submit Offer | Advertise | Free Content

This site uses Thumbshots previews           Website updated:  Thursday Oct 18, 2018 Copyright 2018 - WinPrizesOnline.com. All Rights Reserved.