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 (45517,44851,28313,44845,24438,44867,37057,17657,17756,17981,31354,17237,17278,44861,45515,18430,44775,9341,36472,13425,18237,5993,17703,44863,17492,17904,37267,17114,17092,18996,5259,44878,17755,18427,44868,45421,44739,30135,4765,17848,44640,18688,28530,44711,18042,44858,18981,44766,45277,44856,45042,18172,6875,44894,44685,44765,44767,18650,44849,17009,13922,22509,17351,6782,44855,24411,17601,44745,18353,44865)
Unknown column 'np.person' in 'where clause'