An IF/ELSE approach is probably the cleanest. I'd have to see the pages and understand how to identify which results to show to be precise. It would probably look something like:
<?php
if (isset($_GET["new"])) {
?>
<?php
$maxRows_Categories = 24;
$Categories = new WA_MySQLi_RS("Categories",$DBConnection,$maxRows_Categories);
$Categories->setQuery("SELECT productcategories.*, products.*, productmanufacturers.* FROM products LEFT OUTER JOIN productcategories ON products.ProductCategoryID = productcategories.CategoryID LEFT OUTER JOIN productmanufacturers ON products.ProductManufacturerID = productmanufacturers.ManufacturerID WHERE productcategories.Live = 1 AND productmanufacturers.Live = 1 AND productcategories.CatPermalink = ? AND products.ProductLive = 1 ORDER BY products.ProductOrder ASC");
$Categories->bindParam("s", "".$_GET["perm"] ."", "-1"); //permparam
$Categories->execute();
?>
<?php
} else if (isset($_GET["clearance"])) {
?>
<?php
$maxRows_Categories = 24;
$Categories = new WA_MySQLi_RS("Categories",$DBConnection,$maxRows_Categories);
$Categories->setQuery("SELECT productcategories.*, products.*, productmanufacturers.* FROM products LEFT OUTER JOIN productcategories ON products.ProductCategoryID = productcategories.CategoryID LEFT OUTER JOIN productmanufacturers ON products.ProductManufacturerID = productmanufacturers.ManufacturerID WHERE productcategories.Live = 1 AND productmanufacturers.Live = 1 AND productcategories.CatPermalink = ? AND products.ProductLive = 1 ORDER BY products.ProductOrder ASC");
$Categories->bindParam("s", "".$_GET["perm"] ."", "-1"); //permparam
$Categories->execute();
?>
<?php
} else {
?>
<?php
$maxRows_Categories = 24;
$Categories = new WA_MySQLi_RS("Categories",$DBConnection,$maxRows_Categories);
$Categories->setQuery("SELECT productcategories.*, products.*, productmanufacturers.* FROM products LEFT OUTER JOIN productcategories ON products.ProductCategoryID = productcategories.CategoryID LEFT OUTER JOIN productmanufacturers ON products.ProductManufacturerID = productmanufacturers.ManufacturerID WHERE productcategories.Live = 1 AND productmanufacturers.Live = 1 AND productcategories.CatPermalink = ? AND products.ProductLive = 1 ORDER BY products.ProductOrder ASC");
$Categories->bindParam("s", "".$_GET["perm"] ."", "-1"); //permparam
$Categories->execute();
?>
<?php
}
?>
<?php
$Categories_Total = $Categories->TotalRows;
$Req_Pages = ceil($Categories_Total/$maxRows_Categories);
?>
I didn't actually update the SQL statements, and I'm not sure exactly how you pass in the page you came from in the url, but that is the general syntax of the IF statement and recordsets.