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 (39676,13988,44868,24412,16935,18572,45421,18719,44853,44765,44835,18981,16885,4765,44858,28313,45042,18427,17839,17492,44854,45518,31354,44766,13,6782,3,17835,44869,18172,17756,44863,18446,18900,44745,45262,45229,8753,45177,17092,44867,45516,14622,30986,44848,10402,5410,44849,43800,44689,44687,45567,13425,17981,30135,44764,44865,45561,44768,44671,45051,44767,18286,17904,45043,44866,19057,17755,6862,22509)
Unknown column 'np.person' in 'where clause'