Unknown column 'acuerdo' in 'where clause'