No Joy
Jayson
Sorry I know this ticket is a little old, just getting round to doing it, does this apply to ps2? as my intermediate file is different to yours then?
this is what i got
<div id="sideMenu">
<?php /* ?>
<?php require_once('../Connections/localhost.php'); ?>
<?php */ ?>
<?php
mysql_select_db($database_localhost, $localhost);
$query_ProductCategories = "SELECT * FROM productcategories WHERE CategoryID = (SELECT ProductCategoryID FROM products WHERE ProductCategoryID = CategoryID AND ProductLive <> 0 LIMIT 1)";
$ProductCategories = mysql_query($query_ProductCategories, $localhost) or die(mysql_error());
$row_ProductCategories = mysql_fetch_assoc($ProductCategories);
$totalRows_ProductCategories = mysql_num_rows($ProductCategories);
?>
<?php do { ?>
<?php
$catParam = $row_ProductCategories['CategoryID'];
?>
<?php
$catParam_ProductMenu = "0";
if (isset($catParam)) {
$catParam_ProductMenu = (get_magic_quotes_gpc()) ? $catParam : addslashes($catParam);
}
mysql_select_db($database_localhost, $localhost);
$query_ProductMenu = sprintf("SELECT * FROM products WHERE ProductLive <> 0 AND COALESCE((SELECT GroupingID FROM productoptions WHERE productoptions.ProductID = products.ProductID LIMIT 1), ProductID) = ProductID AND ProductCategoryID = %s", GetSQLValueString($catParam_ProductMenu, "int"));
$ProductMenu = mysql_query($query_ProductMenu, $localhost) or die(mysql_error());
$row_ProductMenu = mysql_fetch_assoc($ProductMenu);
$totalRows_ProductMenu = mysql_num_rows($ProductMenu);
$WA_localRoot = "".$WAGLOBAL_localRoot. "";
$WA_remoteRoot = "".$WAGLOBAL_remoteRoot. "";
$WA_curURL = strtolower((isset($_SERVER["PHP_SELF"]))?$_SERVER["PHP_SELF"]:"");
$assumedRoot = $WA_remoteRoot;
if ((strpos($WA_curURL,strtolower($WA_localRoot)) !== false && strpos($WA_curURL,strtolower($WA_localRoot)) == 0) && (strlen($WA_localRoot) >= strlen($WA_remoteRoot) || strpos($WA_curURL,strtolower($WA_localRoot)) === 0)) {
$assumedRoot = $WA_localRoot;
}
?>
<a href="<?php echo($assumedRoot); ?>Products_Results.php?Search=true&CategoryID=<?php print $row_ProductCategories['CategoryID']; ?>"><h2><?php print $row_ProductCategories['CategoryName']; ?></h2></a>
<ul >
<?php do { ?>
<?php if ($totalRows_ProductMenu > 0) { // Show if recordset not empty ?>
<li><span><a href="<?php echo($assumedRoot); ?>Products_Detail.php?ProductID=<?php echo $row_ProductMenu['ProductID']; ?>"><?php print $row_ProductMenu['ProductName']; ?></a></span></li>
<?php } // Show if recordset not empty ?>
<?php } while ($row_ProductMenu = mysql_fetch_assoc($ProductMenu)); ?></ul>
<?php
mysql_free_result($ProductMenu);
?>
<?php } while ($row_ProductCategories = mysql_fetch_assoc($ProductCategories)); ?>
<?php
mysql_free_result($ProductCategories);
?>
</div>