You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''820938363\'' at line 1 Query :select email from siparis where randStr = '820938363\'