php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #6025 addslashes should escape %
Submitted: 2000-08-08 10:50 UTC Modified: 2000-08-08 12:17 UTC
From: guillaume dot morin at alcove dot fr Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.1pl2 OS: Debian GNU/Linux
Private report: No CVE-ID: None
 [2000-08-08 10:50 UTC] guillaume dot morin at alcove dot fr
Hi folks,

Since % has a special sense in with the "LIKE" operator,
I think it should be escaped by addslashes.


Comments welcome. Hope this helps,

Guillaume Morin.

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-08 12:17 UTC] waldschrott@php.net
what for?
select * from tab where y like '%thin';

I guess you did not understand SQL or you didn?t made clear what you want...
PHP can do many things for you but it won?t analyze your SQL logic and escape everything you forgot to...

thanks for using php
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Sep 08 01:01:28 2024 UTC