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 (18688,39676,17904,44837,3,45518,17657,18900,44858,45229,44861,24441,44711,19078,18353,18427,44767,19057,45042,44870,3883,44851,45567,17335,45517,44739,43800,18996,44854,17237,5993,44869,6782,45561,44848,44745,17351,5410,22509,44855,31354,44867,13922,44669,18172,28530,45262,17601,44674,28313,44873,13,18430,30963,18446,32454,44685,45051,17092,18981,44531,6609,45516,44866,37057,16885,6862,4765,13425,18648)
Unknown column 'np.person' in 'where clause'