note 93539 deleted from mysqli.real-escape-string by danbrown

From: Date: Tue, 15 Sep 2009 17:37:16 +0000
Subject: note 93539 deleted from mysqli.real-escape-string by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-160587@lists.php.net to get a copy of this message
Note Submitter: Jannes ---- 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.

« previous php.notes (#160587) next »