Unknown column 'tipe' in 'where clause'