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 (18996,44689,44766,44868,6875,44878,44845,28530,24441,18688,24412,5388,44687,44875,17703,17237,30986,17009,18900,44711,19057,18301,45277,17848,18652,44745,4765,17756,44764,5410,45177,6782,14622,28313,18353,17755,17527,10402,16885,17981,6862,30135,13988,44855,9341,17492,45180,5259,44870,16935,44765,44848,3,44884,17114,18648,18279,44768,45518,45051,18981,43800,45517,37057,24438,45346,17335,18427,44873,44837)
Unknown column 'np.person' in 'where clause'