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 (30986,43800,17237,45277,37057,6862,5993,44531,44866,18894,30135,17527,18981,17904,44711,18719,14622,18185,18794,44858,17981,18650,44835,24438,18900,45051,17848,17556,24411,17335,39676,44894,36472,44875,44870,17492,31354,18688,18652,8753,28530,17756,44865,17092,44873,17839,44768,44837,44640,45346,19057,45043,45421,44869,44851,30963,44856,44868,13425,18430,5388,3,44687,4765,14402,13,16935,44767,19078,45518)
Unknown column 'np.person' in 'where clause'