Unknown column 'discoveries' in 'where clause'