note 93539 added to mysqli.real-escape-string

From: Date: Tue, 15 Sep 2009 13:07:42 +0000
Subject: note 93539 added to mysqli.real-escape-string
Groups: php.notes 
Request: Send a blank email to php-notes+get-160575@lists.php.net to get a copy of this message
Please don't use the EREG Example posted by "vita dot plachy at seznam dot cz". You should consider using either addcslashes() or just a plain str_replace(). I'd recomment the use3 of the "AddCustomSlashes": <?php $string = addcslashes($string, '_%'); ?> It's much faster, more straight-forward and doesn't use the slow, old ereg-stuff. ---- Server IP: 69.147.83.197 Probable Submitter: 84.188.180.148 ---- Manual Page -- http://www.php.net/manual/en/mysqli.real-escape-string.php Edit -- https://master.php.net/note/edit/93539 Del: integrated -- https://master.php.net/note/delete/93539/integrated Del: useless -- https://master.php.net/note/delete/93539/useless Del: bad code -- https://master.php.net/note/delete/93539/bad+code Del: spam -- https://master.php.net/note/delete/93539/spam Del: non-english -- https://master.php.net/note/delete/93539/non-english Del: in docs -- https://master.php.net/note/delete/93539/in+docs Del: other reasons-- https://master.php.net/note/delete/93539 Reject -- https://master.php.net/note/reject/93539 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#160575) next »