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 (39676,45286,30986,45180,17237,17351,18430,18279,44531,17657,17335,18894,6862,32454,44858,16885,18652,45346,44685,17835,44848,44687,44745,44875,13988,14402,13,44674,18042,37267,44768,18572,8753,17601,18237,45517,44866,3883,18648,44869,6875,44868,18301,18650,44671,24412,44766,18427,44861,45043,5259,44854,45177,45051,36472,44884,44867,44849,18172,17756,3,43800,18185,9341,44855,6782,14622,17771,28530,17278)
Unknown column 'np.person' in 'where clause'