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 (17839,44866,18279,44868,18648,45277,6862,44837,45516,44768,18286,22509,18430,44878,44765,17601,3,28313,17835,6782,17492,44835,45180,18427,44739,30135,9341,18042,17009,17278,44853,17848,13922,18996,39676,45517,18900,44870,4686,8753,18719,18237,44685,5388,14402,45515,18301,44687,17527,45262,44775,44855,44764,43800,44867,45072,17981,45421,45518,44766,17904,44865,44863,19078,18981,44894,44674,30963,44711,45177)
Unknown column 'np.person' in 'where clause'