Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- sprintf for db query strings
- Lars Eighner
July 4, 2007, 12:06 am
rate this thread
I notice that many examples in the manual use sprintf in constructing
database query strings. Is this just style, or are there some serious
advantages to sprintf over concatenating the string, assuming in both
cases that the variable parts of the string are properly sanitized?
Lars Eighner <http://larseighner.com/ <http://myspace.com/larseighner
Countdown: 566 days to go.
Friends of Lizbeth: help replace failed a/c at Austin's no-kill shelter
- IvÃ¡n SÃ¡nchez Ortega
July 4, 2007, 1:12 am
Re: sprintf for db query strings
Others use query bindings, so you don't even have to bother sanitizing the
Again, just coding style, and convenience for each particular case.
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
Quien puede decir cuanto ama, pequeño amor siente.- Francesco Petrarca.
- » Questions about HTTP headers sent with PHP in HTTP authentication
- — Previous thread in » PHP Scripting Forum
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — The site's Newest Thread. Posted in » Secure Shell Forum