Re: Problem sortiing dyn query

From: Date: Fri, 08 Aug 2003 16:19:06 +0000
Subject: Re: Problem sortiing dyn query
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-158882@lists.php.net to get a copy of this message
Mark wrote:
$query_Recordset1 = sprintf("SELECT * FROM sti_tracking ORDER BY %s %s",$reSort_Recordset1,$direction_Recordset1);
I'm curious. Is there an advantage to using the above format, rather than $query_Recordset1 = "SELECT * FROM sti_tracking ORDER BY $reSort_Recordset1 $direction_Recordset1"; Is the result the same?
Same result. Personal preference. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ PHP|Architect: A magazine for PHP Professionals – www.phparch.com

« previous php.general (#158882) next »