Unknown column 'flag_switch' in 'where clause'