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 (5388,44866,19057,44861,17904,17114,44884,44856,45051,17278,18650,30986,44671,44669,4686,18286,44849,44868,18279,18572,17556,18042,34194,44745,44855,45042,44894,45229,18301,3,17657,4765,30963,44865,8753,17092,44775,44767,45567,44869,44835,18427,24411,44766,13425,13922,28313,36472,37267,44858,44674,45516,18688,44531,45517,18185,44867,14622,44764,18172,18652,17835,44685,44837,44848,44845,43800,44836,45277,39676)
Unknown column 'np.person' in 'where clause'