Code:
	if ($sort == "date") {$order = "sortdate, pmsname, techid";}
	if ($sort == "vendor") {$order = "pmsname, sortdate, techid";}
	if ($sort == "techid") {$order = "techid, pmsname, sortdate";}
	if ($sort == "lengthcall") {$order = "lengthcall, pmsname, techid";}
	if ($sort == "fnum") {$order = "fnum, sortdate, techid";}
	
	$result = mysql_query("SELECT *, DATE_FORMAT(date,'$datesort') as sortdate, DATE_FORMAT(date,'$dateformat') as date, DATE_FORMAT(lengthcall,'$timeformat') as lengthcall FROM outdated,pms,ver WHERE outdated.verid=ver.verid AND pms.pmsid=ver.pmsid ORDER BY '$order'",$db);
Any clue why this routine returns the same order of records no matter what sort variable is given?

Thanks!