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,45346,17335,44856,45177,8753,44711,18172,17904,17237,17839,44765,24411,6609,44531,45517,44873,18430,17009,44687,18185,44894,6862,44685,18652,17527,18286,17556,22509,44861,5388,44863,44671,24441,44689,16885,18894,45421,17492,44878,18572,36472,44640,44764,44836,45042,18688,18301,44767,17114,44865,45051,44870,13425,18042,44851,18446,18650,44835,18981,44674,37057,17835,6875,18427,17601,44848,34194,45229,45515)
Unknown column 'np.person' in 'where clause'