Unknown column 'sample' in 'where clause'