Unknown column 'tool' in 'where clause'