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 (18996,44764,18719,45043,17771,30986,45051,17527,18237,5993,17335,44884,45262,32454,17351,44845,44853,45042,45346,44766,37267,44873,45177,17114,18650,30135,17703,17904,37057,5388,44768,44836,22509,45072,44765,44849,18688,18894,44894,44775,45286,44858,18279,17556,18794,45517,6862,6609,6875,10402,45518,44861,24438,18286,16885,44531,44745,5410,34194,24411,19078,18648,44870,45180,44869,44739,44854,13425,13988,44865)
Unknown column 'np.person' in 'where clause'