I still haven't been able to get this to work, I'm flubbing up somewhere. I'll post some code snippets. Again, the data is already being pulled successfully into the web page from a MSSQL 7 server. But the user has no sorting abilty, so I'd like to include a drop down on the page that will allow them to sort by a few of the fields being displayed.
//The query being used on the page is like this, but changed to protect the innocent:
$query = "SELECT Table.Alias,Table.ProductTicker<many other fields listed> FROM <tables> WHERE ID='$ID' order by Alias;";
//then i set some variables, here are a couple
$product[$index] = $data["Alias"];
$ticker[$index] = $data["ProductTicker"];
//then i display these on the page
<td>$product[$count]</td>
<td>$ticker[$count]</td>
//now create a form drop down. this is where i get confused. How do I call the query and get it to sort by the other field
<form name="Sort">
<select name=DropDown onChange="ChangeThePageSort();">
<option value=-1>
<option value='page.phtml?ID=<? echo $ID; ?>'<??>>Alias</option>
<option value='page.phtml?tID=<? echo $ID ?>'<? ?>>Product Ticker</option>
</select>
</form>
I appreciate any help and apologize if this is still too vague for anyone to help.