MYSQL Error: Unknown column 'y' in 'where clause'