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 (45518,44765,18648,44767,32454,44863,44687,44868,18279,44894,17527,44878,44837,14402,45262,44884,6862,44762,6875,18652,37057,30963,18185,17839,44849,17756,24441,19057,24412,4765,13,30986,44739,44766,44853,24411,44856,44870,3,44764,18572,17657,17492,4686,17278,18286,30135,44671,17703,3883,44768,39676,45286,44875,18353,45229,45072,44674,10402,44858,44854,18981,18688,5993,44775,17771,44640,44685,17755,45517)
Unknown column 'np.person' in 'where clause'