Unknown column 'survey' in 'where clause'