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 (24438,16935,44855,24411,44739,31354,17092,44884,17657,44764,18430,44851,19078,14402,44671,17904,17351,44765,17335,34194,44669,5259,45180,44861,17981,44767,30135,17237,17278,45518,45516,17771,17839,44711,4765,44873,18279,44894,44689,45177,17527,17492,18042,18688,44867,18996,3,19057,18894,18172,18794,44766,32454,28530,6782,17556,9341,13425,44869,30963,6875,5388,44762,44848,39676,18427,44849,45517,18353,18648)
Unknown column 'np.person' in 'where clause'