Unknown column 'thomas' in 'where clause'