Edit report at http://bugs.php.net/bug.php?id=15881&edit=1

 ID:                 15881
 Updated by:         [email protected]
 Reported by:        Xuefer at 21cn dot com
 Summary:            a new format char for sprintf kind function
-Status:             Open
+Status:             Wont fix
 Type:               Feature/Change Request
-Package:            Feature/Change Request
+Package:            Strings related
 Operating System:   all
 PHP Version:        4.1.2
 Block user comment: N
 Private report:     N

 New Comment:

No need for such magic, thank you.


Previous Comments:
------------------------------------------------------------------------
[2002-04-01 05:37:28] Xuefer at 21cn dot com

no one take care of the FEATUREs?



i've forgot sth.

not only addslashes should be supported in sprintf

and also preg_quote and so on, including all "slashes"/"quote" function



and will be nice if some other useful STRING function added into
sprintf



btw: i've take a look at the source code, addslashes() also invoke
sprintf, don't make it infinite nested :)

------------------------------------------------------------------------
[2002-03-06 13:19:05] Xuefer at 21cn dot com

notice that it's capital "%S" not "%s"

or any other unused char

------------------------------------------------------------------------
[2002-03-05 11:23:52] Xuefer at 21cn dot com

i've ask ppl in irc EFnet #php.

none of them like runtime magic quote.

so.......



i would like to have the following feature:



-> sprintf("%S", $string);



which is the same function as addslashes($string);



and i can do as the following:



-> mysql_query(sprintf("UPDATE mytable SET abc='%S'", $string));





i think this would make a great change to those php-sql scripts

------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=15881&edit=1

Reply via email to