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,45262,13988,45180,44775,17351,19057,18794,24441,18688,44867,6609,44669,44863,44764,32454,16885,44711,17657,17335,4765,44685,18427,44849,18042,17556,6782,44836,44866,17601,18237,45177,44671,18172,17492,39676,18894,44873,6875,13425,18279,36472,17835,44855,17839,18652,18650,44848,44835,44858,34194,17848,17092,3,44689,45567,5410,14622,18446,18353,3883,44767,17756,45518,24412,19078,45517,13,44674,17771)
Unknown column 'np.person' in 'where clause'