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 (37267,44689,45043,30986,44894,44767,45567,18172,14622,31354,17839,16885,18301,17848,45277,45042,17755,24438,45262,22509,44711,17601,45072,17092,45517,5388,44856,18894,45421,30963,5993,44764,18446,45229,18794,19057,4765,30135,10402,17981,44766,18042,44869,13,18648,19078,4686,44687,5259,9341,45346,44837,44853,17009,17556,24411,18279,37057,18900,45515,44836,17351,44674,8753,17835,18185,6609,24412,17278,18427)
Unknown column 'np.person' in 'where clause'