note 97661 added to mysqli.real-escape-string

From: Date: Sat, 01 May 2010 07:40:49 +0000
Subject: note 97661 added to mysqli.real-escape-string
Groups: php.notes 
Request: Send a blank email to php-notes+get-168836@lists.php.net to get a copy of this message
Why is it that a connection to a MySQL database is required in order to successfully evaluate the escape? We don't tell the function what collation or character set we're actively using so it doesn't make sense to me that this function can't be statically called apart from the connection (i.e. $result = mysqli::real_escape_string($_POST['search']) ;) ---- Server IP: 69.147.83.197 Probable Submitter: 99.41.190.174 ---- Manual Page -- http://www.php.net/manual/en/mysqli.real-escape-string.php Edit -- https://master.php.net/note/edit/97661 Del: integrated -- https://master.php.net/note/delete/97661/integrated Del: useless -- https://master.php.net/note/delete/97661/useless Del: bad code -- https://master.php.net/note/delete/97661/bad+code Del: spam -- https://master.php.net/note/delete/97661/spam Del: non-english -- https://master.php.net/note/delete/97661/non-english Del: in docs -- https://master.php.net/note/delete/97661/in+docs Del: other reasons-- https://master.php.net/note/delete/97661 Reject -- https://master.php.net/note/reject/97661 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#168836) next »