Unknown column 'tender' in 'where clause'