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); Correct? Tim Winters Manager, Creative Development Sampling Technologies Incorporated (STI) [EMAIL PROTECTED] [EMAIL PROTECTED] W: 902 450 5500 C: 902 430 8498 -----Original Message----- From: John W. Holmes [mailto:[EMAIL PROTECTED] Sent: August 7, 2003 7:15 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Problem sortiing dyn query Creative Solutions New Media wrote: > Hi > > Can someone give me some indication why this might not be working? > > $query_Recordset1 = sprintf("SELECT * FROM sti_tracking ORDER BY '%s' '%s'", $query_Recordset1 = sprintf("SELECT * FROM sti_tracking ORDER BY %s %s", > $reSort_Recordset1,$direction_Recordset1); > > the values for $reSort_Recordset1 and $direction_Recordset1 are passed > through from another page. $reSort_Recordset1 is the files to sort on and > $direction_Recordset1 is the direction (ASC or DESC). > > Thanks You're more than welcome. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ PHP|Architect: A magazine for PHP Professionals - www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php