Unknown column 'c.status' in 'where clause'