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 (44669,6782,45262,44894,3,18650,18652,44687,17556,14622,44875,24412,5993,45277,17703,30135,44878,44745,18719,30963,24441,44762,17237,18894,44767,44866,45515,13988,19078,44674,45561,4765,44768,16885,24411,31354,44849,36472,3883,44640,14402,45346,6609,44848,44764,16935,44836,17527,34194,37267,45229,45051,18430,44884,19057,45421,17351,45042,44689,44671,18301,18286,4686,44853,13425,24438,44837,28530,18279,22509)
Unknown column 'np.person' in 'where clause'