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 (18794,44849,17492,30986,44853,6782,44766,17755,45516,14402,16885,18430,17904,18719,18648,44687,44861,45072,44854,31354,17835,18172,17657,44866,17839,36472,44689,18572,17703,34194,44531,13922,44837,17527,45561,17335,5259,18652,24438,18688,44767,18301,44739,17114,6609,44873,44764,45346,18900,17756,24411,18650,4765,44875,28530,39676,22509,18279,44640,45229,19057,17092,44674,18996,44884,45421,44855,3,18286,30963)
Unknown column 'np.person' in 'where clause'