Error in query: SELECT * FROM profiles where id = pat LIMIT 1. Unknown column 'pat' in 'where clause'