Req #47550 [Opn->Bgs]: mysql_real_escape_strings_set()

From: Date: Mon, 18 Apr 2011 12:05:28 +0000
Subject: Req #47550 [Opn->Bgs]: mysql_real_escape_strings_set()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-160248@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=47550&edit=1 ID: 47550 Updated by: johannes@php.net Reported by: alexander at vourtsis dot com Summary: mysql_real_escape_strings_set() -Status: Open +Status: Bogus Type: Feature/Change Request Package: MySQL related Operating System: Windows Linux OSX PHP Version: 5.3.0beta1 Block user comment: N Private report: N New Comment: I don't fully understand what you want. But I assume you want to have some magic to escape some random strings in some situations magically. We won't do that. MAgic makes debugging, etc. way harder! Explicit code makes checking simpler. Previous Comments: ------------------------------------------------------------------------ [2009-03-03 10:41:15] alexander at vourtsis dot com Description: ------------ I'd want to suggest a function to switch escaping of input strings for an sql query. So far escaping occurs by the use of mysql_real_escape_string(). Using this for each variable can result into a clutter like, mysql_real_escape_string($test1); mysql_real_escape_string($test2); mysql_real_escape_string($test3); mysql_real_escape_string($test4); I suggest to create a function to turn real escape string on and off like, mysql_real_escape_strings_set(1); and to get if escaping is on: mysql_real_escape_strings_get(); Thank you in Advance, Reproduce code: --------------- --- From manual page: function.mysql-real-escape-string --- ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=47550&edit=1

« previous php.bugs (#160248) next »