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 (30135,5993,39676,28530,17556,17601,24412,18446,44762,45517,44687,18286,6782,17237,18301,18688,14622,44671,17981,44669,44884,4765,17848,45277,44775,44878,18572,44848,44766,24441,18719,44851,18650,16935,19078,18981,13988,44685,44689,10402,32454,18652,28313,18430,44867,45516,18996,44837,13425,45518,17835,18900,17756,44531,44739,17492,45346,3,36472,17009,17839,45177,17703,6862,44845,45072,17755,13922,45421,37267)
Unknown column 'np.person' in 'where clause'