So don't I need some kind of variable like below (but not this) in the PowerStore example:
$colname_MenuItems = "-1";
if (isset($_GET['ItemCategory'])) {
$colname_MenuItems = $_GET['ItemCategory'];
}
Also, what column names in the Powerstore example would replace ItemCategory and CategoryID from the tutorial?
Below is the record set I'm referring to in the Tutorial and what I'm attempting in the PowerStore example:
Tutorial
<?php
$colname_MenuItems = "-1";
if (isset($_GET['ItemCategory'])) {
$colname_MenuItems = $_GET['ItemCategory'];
}
mysql_select_db($database_nested, $nested);
$query_MenuItems = sprintf("SELECT * FROM menu_items WHERE ItemCategory = %s", GetSQLValueString($colname_MenuItems, "int"));
$MenuItems = mysql_query($query_MenuItems, $nested) or die(mysql_error());
$row_MenuItems = mysql_fetch_assoc($MenuItems);
$totalRows_MenuItems = mysql_num_rows($MenuItems);
?>
Powerstore Nested tables
<?php
mysql_select_db($database_powerstore, $powerstore);
$query_MenuItems = "SELECT ps4_products.*,ps4_categories.CategoryName FROM ps4_products INNER JOIN ps4_productcategories ON ps4_products.ProductID = ps4_productcategories.ProductID INNER JOIN ps4_categories ON ps4_categories.CategoryID = ps4_productcategories.CategoryID";
$MenuItems = mysql_query($query_MenuItems, $storecss_powerstore) or die(mysql_error());
$row_MenuItems = mysql_fetch_assoc($MenuItems);
$totalRows_MenuItems = mysql_num_rows($MenuItems);
?>