RE: [PHP] Problem sortiing dyn query

From: Date: Fri, 08 Aug 2003 16:04:10 +0000
Subject: RE: [PHP] Problem sortiing dyn query
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-158873@lists.php.net to get a copy of this message
--- Creative Solutions New Media <csnm@ns.sympatico.ca> wrote: > Hi John, > > Thanks. > > Just wanted to make sure we were on the same page as the line of > code in > question wrapped in my original message. > > You saying the solution is > > $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? ===== Mark Weinstock mark_weinstock@yahoo.com *************************************** You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing. *************************************** __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com

« previous php.general (#158873) next »