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 (45421,18894,18688,18996,45518,17835,30135,44764,13425,18650,6875,44863,22509,45286,44855,17601,3,44868,44853,44711,13988,34194,18719,19078,6782,45043,45516,45262,44762,30963,44875,44687,4686,44873,24441,44851,44671,44867,44858,45072,44685,44689,44894,44640,6862,44856,13,28313,18301,45180,18648,45561,18353,18237,17657,18042,44766,44768,37267,17556,45277,17114,4765,16935,44674,14402,44845,45229,17527,18279)
Unknown column 'np.person' in 'where clause'