Re: Problem sortiing dyn query

From: Date: Thu, 07 Aug 2003 22:22:47 +0000
Subject: Re: Problem sortiing dyn query
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-158744@lists.php.net to get a copy of this message
Creative Solutions New Media wrote:
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); Correct?
Yep. You needed to take out those single quotes. You were telling the query to ORDER BY 'string' 'string', which doesn't make sense. You want it to ORDER BY column direction... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ PHP|Architect: A magazine for PHP Professionals – www.phparch.com

« previous php.general (#158744) next »