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 (17839,44767,44685,44861,45286,19078,28530,44863,36472,44848,44873,17114,24412,44711,18996,45043,45421,6609,18572,18172,44689,44671,45561,44853,18185,44640,18279,45229,18688,44865,18446,44768,44762,17351,45180,18430,37057,14622,17771,45567,14402,43800,3,44674,24438,45042,44875,6782,44854,44836,17601,18794,5410,10402,44878,17092,44855,34194,17835,45516,4765,44866,24411,17556,45072,45177,30963,37267,18650,18648)
Unknown column 'np.person' in 'where clause'