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 (45229,30963,44765,44531,17848,18794,18042,45262,36472,44775,45072,18237,45561,37267,17114,44745,44836,17904,44873,17771,45567,19057,5259,45518,3,45346,17237,37057,16885,9341,6875,18286,18185,24412,18996,13988,44848,44854,45277,17755,44866,5410,5388,17839,44711,45421,39676,4686,28530,45043,24411,44863,44869,44764,18301,44687,16935,44835,18981,8753,44669,17835,18172,3883,17492,18648,6782,30986,45515,44861)
Unknown column 'np.person' in 'where clause'