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 (44845,18042,44766,30986,44640,45072,17771,5993,18353,18185,19078,18900,18648,44861,44869,44884,16935,18794,3883,18719,45567,44851,45177,44764,5259,6862,9341,44865,18446,10402,44858,6782,17335,17848,13425,44854,6875,39676,17981,17904,28313,44739,45561,17009,44867,18237,45042,18996,44768,4765,44855,45277,45516,18572,13922,43800,44767,30135,37057,14402,45346,18172,5410,44875,44531,24438,17492,17092,5388,18652)
Unknown column 'np.person' in 'where clause'