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 (45229,24441,44845,17755,13988,45421,28530,18650,45286,44766,18301,44775,45043,6609,14402,44854,17601,19057,45051,8753,10402,17114,45518,44855,17092,36472,44640,45515,43800,5259,17556,18430,18894,17237,44865,17771,18353,44878,4686,44711,44835,16885,24412,44863,44867,18996,45262,45072,6875,44689,18719,45042,17278,4765,44768,44851,5993,6862,44884,30986,22509,17981,44873,44856,18652,44861,45180,17839,17009,44853)
Unknown column 'np.person' in 'where clause'