Unknown column 'bat' in 'where clause'