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,31354,3,44671,44873,24412,44837,19078,44868,44739,44689,45515,44878,30135,14622,17114,44836,44674,45042,5259,6862,22509,6782,44835,16885,44687,44764,6609,17657,17981,44854,45277,45177,18237,18981,17835,44851,45516,44775,37057,44849,44894,44855,5388,44870,44685,18042,44848,34194,44766,45286,44866,45180,19057,18719,44711,17527,17756,18353,13988,18301,28313,18652,9341,44875,45518,5993,18185,13425,45561)
Unknown column 'np.person' in 'where clause'