You are here: Re: sprintf for db query strings « PHP Programming Language « IT news, forums, messages
Re: sprintf for db query strings

Posted by ZeldorBlat on 07/04/07 00:54

On Jul 3, 8:06 pm, Lars Eighner <use...@larseighner.com> wrote:
> 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
> <https://secure.groundspring.org/dn/index.php?aid=12349>

Just style. Personally I don't like the whole sprintf thing and
prefer concatenation. Others prefer to put everything in double-
quotes so variables are automatically inserted. It's all personal
preference.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация