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 (18794,45516,24411,44873,44878,44866,44765,18301,44854,45043,17009,44875,44768,44849,45561,24441,30135,8753,18894,13425,18430,9341,14622,45229,44745,45346,13,3,18042,44669,44848,44894,17278,37057,17556,44640,36472,37267,6609,44531,17492,10402,44863,45517,18279,44853,44868,18652,44836,32454,4765,18172,28313,17601,17755,5388,5259,44687,45515,24438,18981,17114,17527,44869,17839,17335,17904,44851,17657,44739)
Unknown column 'np.person' in 'where clause'