Re: sprintf versus straight entry
- From: The Natural Philosopher <a@xxx>
- Date: Mon, 29 Dec 2008 11:54:46 +0000
Hugh Oxford wrote:
FutureShock wrote:Are there advantages to using sprintf for building DB queries versus direct building?
Thanks
Scotty
Personally I use sprintf for just about everything. I find it makes everything far more legible. You can put sql queries inside single quoted strings and then use double quotes within it.
Some people might say there is a performance overhead, but if my performance issues were simply down to this kind of thing I would be grateful.
My experience also..the database enquiry is probably 10-1000 times slower than generating the query..
.
- References:
- sprintf versus straight entry
- From: FutureShock
- Re: sprintf versus straight entry
- From: Hugh Oxford
- sprintf versus straight entry
- Prev by Date: Re: sprintf versus straight entry
- Next by Date: Re: Is there a better way?
- Previous by thread: Re: sprintf versus straight entry
- Next by thread: Re: sprintf versus straight entry
- Index(es):