note 57458 deleted from function.mysql-real-escape-string by tularis

From: Date: Tue, 04 Oct 2005 20:11:49 +0000
Subject: note 57458 deleted from function.mysql-real-escape-string by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-96390@lists.php.net to get a copy of this message
Note Submitter: Steve Clay Reason: useless ---- Finding PHP & docs lacking an easy MySQL string escaping function for arrays, taking into account best practices, I made one: http://wd.mrclay.org/scripts/mysql_safe_array/ If PHP >= 4.3 and a MySQL connection is available (mysql_ping() is used once), the escaping uses mysql_real_escape_string(), otherwise mysql_escape_string(). If magic_quotes is enabled, the function first stripslashes() the values. The function can also escape slices of an array, if you prefer. Documentation is as close to the PHP docs as I had time for.

« previous php.notes (#96390) next »