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 (4686,44865,17755,18650,3,18172,16885,17601,44767,13425,44766,44848,10402,45346,17835,6782,18286,17839,44764,44855,39676,44870,44851,17237,17527,44669,44861,44884,44674,44640,18652,18894,17703,44854,9341,45229,18185,44878,13922,17756,44835,17556,37057,24412,44863,22509,45561,6875,30986,17657,44853,44837,44762,36472,45517,6609,45515,14622,17492,44768,44869,13988,17335,44685,17114,3883,18301,16935,44894,30135)
Unknown column 'np.person' in 'where clause'