If you are happy to hand code a solution then this is an example of how I would do it
switch($_POST["sortBy"]) {
case "newest":
$orderClause = "tbl_products.tstampinsert DESC, tbl_products.title";
break;
case "a-z":
$orderClause = "tbl_products.title, tbl_products.sortorder";
break;
case "z-a":
$orderClause = "tbl_products.title DESC, tbl_products.sortorder";
break;
default:
// default behaviour
$orderClause = "tbl_products.sortorder, tbl_products.title";
}
mysql_select_db($database_connDB, $connDB);
$query_rsRecordsetName = "SELECT tbl_products.* FROM tbl_products ORDER BY " . $orderClause . "";
$rsRecordsetName = mysql_query($query_rsRecordsetName, $connDB) or die(mysql_error());
$row_rsRecordsetName = mysql_fetch_assoc($rsRecordsetName);
$totalRows_rsRecordsetName = mysql_num_rows($rsRecordsetName);