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 (17237,45286,45421,17904,14622,5410,17756,30135,18648,13,24412,4686,18172,18430,9341,44674,44687,45516,45517,6782,18427,17351,17839,37267,44849,17835,3883,44884,17848,45277,17657,44894,45043,5388,44768,18794,18042,44854,34194,18572,18279,44851,44845,37057,4765,18353,13988,39676,44775,8753,32454,45051,44868,22509,6875,44869,44745,45042,44875,18301,44853,17755,44765,44711,6862,44837,17492,44764,17278,45229)
Unknown column 'np.person' in 'where clause'