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 (18286,44875,18237,13,45346,24441,44856,45051,45229,44711,45262,44884,17848,44768,45515,17335,13988,17527,18172,18650,44775,17771,17009,31354,44687,44836,16885,17351,5259,44767,5388,18900,44870,44851,44865,45177,17703,44845,18648,4686,18981,18446,43800,14622,44848,30135,6862,5410,44835,6782,44863,24438,44869,24412,44894,45421,44689,44854,44762,45286,17839,45561,30963,17755,45277,17278,18301,45043,44868,45180)
Unknown column 'np.person' in 'where clause'