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 (45515,17657,6782,5410,3,18172,45421,18652,30986,6609,24441,28313,13988,44768,18894,39676,18185,44837,45051,44854,44849,45518,44671,17835,17335,17092,17601,17351,44861,45229,44674,19078,19057,44858,44870,44836,44689,18572,43800,44856,17771,44762,24438,18286,17756,45286,44766,44767,44875,8753,44894,9341,6862,17556,30135,44848,30963,24412,5993,17009,37267,45177,17904,44873,24411,44855,13,17848,45262,44687)
Unknown column 'np.person' in 'where clause'