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 (45286,18237,6862,18652,5388,18353,44745,4686,44837,45229,17351,45262,17839,44855,44764,18894,44835,18648,17703,24441,5410,16885,17755,45072,31354,17237,44669,44868,18286,18279,45043,17835,45515,24412,44768,18301,44671,44674,5993,4765,17848,24411,18794,18042,44894,44861,44711,18572,45516,19078,44739,18446,17492,18427,13425,44775,17092,45561,44848,44851,18996,43800,10402,44856,44836,44858,44687,44765,28313,37057)
Unknown column 'np.person' in 'where clause'