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 (5259,44837,44669,18427,24438,6609,44878,6875,44764,22509,44845,4686,6782,18719,13,44711,44854,44875,18652,17981,44768,44674,45515,44687,18688,18185,45043,17755,5993,17556,45262,18353,45561,18172,44873,45518,45042,18446,18648,45517,3,44865,17703,44671,17771,5410,44836,3883,31354,45421,44863,45567,17492,44855,37057,13922,44835,44853,17009,44689,18572,44765,28530,18301,45072,17601,45180,28313,18996,44848)
Unknown column 'np.person' in 'where clause'