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 (45180,5993,18237,24438,45042,19078,17114,44745,14622,18572,4765,16885,39676,44767,24412,13,18301,3883,17335,17755,36472,4686,44861,24441,3,44873,34194,6875,44689,44764,44762,45177,44863,8753,44685,14402,44674,5410,18688,17278,44878,45072,17756,44870,37267,18894,45516,17981,45262,17657,44849,45286,28313,17237,18648,17527,13425,44853,45277,18286,44856,17835,43800,17556,5388,44765,18650,18430,44875,44851)
Unknown column 'np.person' in 'where clause'