SELECT pa_ContactID,t_ContactName FROM Profiles as P 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-20' and (d_EndTime >= '08:00:00' OR d_EndTime ='00:00:00')) OR (d_EndDate >'2014-04-20')) 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 b_closed=0 and pa_ContactID not in (15756,15755,15754) group by pa_ContactID order by `b_featured` DESC,t_ContactName asc
:: :: Beirut City Guide