Error in query: SELECT DISTINCT(np.person) AS person, p.first_name, p.last_name, nx.id AS news_id FROM news_person AS np, person AS p, news_category AS nc LEFT JOIN news AS nx ON nx.id = (SELECT ny.id FROM news AS ny, news_person AS nyp, news_category AS nyc WHERE ny.id = nyc.news AND nyc.category = 310 AND nyp.person = np.person AND nyc.news = ny.id AND nyp.news = ny.id AND ny.entry_active = 't' ORDER BY entry_date DESC LIMIT 0, 1) WHERE np.person = p.id AND nc.category = 310 AND nc.news = np.news AND np.person = p.id AND p.id IN (45277,10402,43800,24412,44867,18172,31354,45229,44687,44875,45561,45346,44765,44739,3883,5993,17756,45043,17237,18650,44775,9341,18237,45262,36472,44878,44768,19057,44870,24411,18894,13,5388,44640,37267,45567,13922,17981,18648,44861,32454,13425,44711,44854,44835,44865,28530,16885,44858,45516,44848,18353,24438,44669,44868,44856,37057,3,44767,18301,45518,45180,18042,5410,17839,44762,17755,45421,30135,44764)
Unknown column 'np.person' in 'where clause'