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 (44764,44866,8753,45229,44775,18301,44689,17278,17981,18650,18981,44884,45421,44856,17092,17351,44848,13,45262,22509,30135,44745,34194,45517,45286,18900,17703,17848,17237,5993,44669,44865,44849,36472,45042,44855,5410,44836,37267,44767,19078,44762,17009,9341,24411,5259,24412,3,13922,45518,44765,18427,44853,18652,44671,18446,18996,45515,44739,44858,44674,17556,19057,45180,18279,44640,18894,16885,4686,18719)
Unknown column 'np.person' in 'where clause'