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 (22509,18353,3,45515,44739,44858,44836,3883,44775,13,44867,44762,9341,17556,44873,44640,17755,18996,18572,6609,6862,18301,44894,44845,44866,16885,44851,45517,6875,32454,18900,18652,17092,4765,13988,17601,17114,18794,45262,18427,44766,44764,45518,30135,18279,18446,44837,44767,17703,45229,44711,14622,44863,5388,44835,18648,44878,45051,44531,18042,17771,44855,44689,44768,28530,45567,5993,43800,24411,45286)
Unknown column 'np.person' in 'where clause'