From:             alexander at vourtsis dot com
Operating system: Windows Linux OSX
PHP version:      5.3.0beta1
PHP Bug Type:     *Database Functions
Bug description:  mysql_real_escape_strings_set()

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 bug report at http://bugs.php.net/?id=47550&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=47550&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=47550&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=47550&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=47550&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=47550&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=47550&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=47550&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=47550&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=47550&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=47550&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=47550&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=47550&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=47550&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=47550&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=47550&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=47550&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=47550&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=47550&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=47550&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=47550&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=47550&r=mysqlcfg

Reply via email to