note 57458 added to function.mysql-real-escape-string

From: Date: Tue, 04 Oct 2005 20:07:10 +0000
Subject: note 57458 added to function.mysql-real-escape-string
Groups: php.notes 
Request: Send a blank email to php-notes+get-96389@lists.php.net to get a copy of this message
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. ---- Manual Page -- http://www.php.net/manual/en/function.mysql-real-escape-string.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+57458 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57458&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57458&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57458&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57458&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57458&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57458&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57458&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+57458&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#96389) next »