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 (18794,17771,44764,24411,44685,13988,17092,44875,44739,17114,18572,44894,18430,6875,30963,44851,17703,17335,10402,4686,17981,44870,18172,44863,28313,13425,45277,44768,45518,39676,22509,44848,44873,3883,18688,45517,45421,45262,45567,17904,17278,30135,44671,44854,3,18286,18981,16935,31354,13,32454,17839,19078,37057,18648,17835,44669,17755,16885,45051,18042,5259,44845,45229,18301,44762,14402,44867,6609,44849)
Unknown column 'np.person' in 'where clause'