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 (6782,44856,45518,18652,14622,45286,19057,44884,36472,28530,45517,17009,44685,44766,44848,39676,6609,17092,44867,6875,45051,3,30963,37267,18688,18648,45346,5388,44853,18185,17335,44855,44640,5410,18353,18427,45072,44835,17755,17839,44671,18996,18279,30986,4686,24438,18430,13922,32454,13425,44851,44868,17114,44866,44762,44870,44836,22509,44845,17981,17848,44765,10402,24441,45229,17657,6862,18794,45515,44849)
Unknown column 'np.person' in 'where clause'