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 (45177,24441,18237,44894,44640,44868,44764,45518,24411,19057,44766,17237,4765,45262,18650,44674,44671,18900,30963,37267,44875,17703,30135,44867,44873,45346,6862,17492,44863,16935,13922,36472,28313,14402,16885,44866,14622,18996,5259,45072,44853,31354,18301,43800,45561,44767,8753,4686,18172,18042,17527,9341,17114,17278,18430,44884,18353,19078,45516,18427,44856,44711,44849,34194,5410,44768,5993,44739,44762,45567)
Unknown column 'np.person' in 'where clause'