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 (45561,17657,17848,36472,45180,18894,45177,18353,18427,45515,18996,14622,17981,17335,44861,44868,19057,18794,44894,44671,45518,30963,44884,44745,45421,44873,45567,18301,39676,24438,44848,44674,45262,24412,31354,13425,44849,44853,45286,28313,45042,17009,18572,34194,44640,44762,13,17771,44711,9341,17492,4765,44766,17835,17601,44837,44875,17278,17237,6782,28530,18981,44669,22509,44869,45346,44866,44851,16935,45517)
Unknown column 'np.person' in 'where clause'