SELECT pa_ContactID,t_ContactName FROM Profiles as P inner join Categories_ContactsCategories as CC on (CC.pi_contactID=pa_ContactID) inner join Categories on (pa_CategoryID=pi_CategoryID) where P.b_Deleted=0 and P.b_Completed=1 and b_featured=0 and ( (t_picsFolder='place' and b_Status=1) OR (t_picsFolder!='place') ) and ( (t_picsFolder='event' and pa_ContactID in (select pi_ContactID FROM Profiles_Events WHERE pi_ContactID=pa_ContactID and ((d_EndDate='0000-00-00') Or (d_EndDate ='2014-04-19' and (d_EndTime >= '08:00:00' OR d_EndTime ='00:00:00')) OR (d_EndDate >'2014-04-19')) and NotImportant=0)) OR (t_picsFolder!='event') ) and ( (t_picsFolder='movie' and 1 in (select b_PlayingNow FROM Profiles_Movies WHERE pi_MovieID=pa_ContactID))OR (t_picsFolder!='movie') ) and ((pi_ParentID in (71)) or (pi_ParentID in (select pa_CategoryID from Categories where pi_ParentID in (71)))) and b_closed=0 and pa_ContactID not in (15756,15755,15754) group by pa_ContactID order by `b_featured` DESC,t_ContactName asc
:: Beirut.com :: Beirut City Guide