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 (18688,18301,44687,44849,44685,44848,43800,16935,5388,17527,17835,4686,44711,17556,44765,44766,18430,44858,34194,44878,24411,17848,44868,17278,18652,18286,39676,13,30963,44873,5993,30135,45043,44640,18172,18794,36472,44854,44762,18572,5410,44853,45180,44745,37057,45262,45515,18446,37267,44863,19078,44836,45516,44870,44865,17839,3,13922,45042,44674,44851,10402,17335,18279,17755,44671,13988,44855,6875,45229)
Unknown column 'np.person' in 'where clause'