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 (24412,44849,17839,18237,44848,17835,18301,18286,16935,31354,17335,18353,44689,44674,30135,45346,44764,18719,18427,44531,44869,44835,18894,3,44865,45277,6782,37267,45421,44856,18042,18430,16885,17278,45517,44711,6609,17703,17237,9341,6875,30986,44851,44853,44866,18172,44873,44858,44845,17756,17009,17114,6862,45042,17755,44836,44765,24411,17904,44870,22509,17601,44685,45262,5388,44837,44863,44884,44875,18688)
Unknown column 'np.person' in 'where clause'