Need to Display a Category from Database

Need to have a ProductCatDesc displayed which is pulled from Database under Products Table
thank you
<p><?php echo $ProductCatDesc_row['ProductCatDesc']; ?></p>
current rs
$maxRows_WADAProducts = 9;
$pageNum_WADAProducts = 0;
if (isset($_GET['pageNum_WADAProducts'])) {
  $pageNum_WADAProducts = $_GET['pageNum_WADAProducts'];
$startRow_WADAProducts = $pageNum_WADAProducts * $maxRows_WADAProducts;

mysql_select_db($database_PowerStoreConnection, $PowerStoreConnection);
$query_WADAProducts = "SELECT ps4_products.*, coalesce(GroupingID,ps4_products.ProductID) AS GroupingID FROM ps4_products LEFT OUTER JOIN ps4_productoptions ON ps4_productoptions.ProductID = ps4_products.ProductID " .((isset($_SESSION["WADbSearch1_Products_Category_Results"]) && $_SESSION["WADbSearch1_Products_Category_Results"] != "")?"LEFT OUTER JOIN ps4_productcategories ON ps4_products.ProductID = ps4_productcategories.ProductID":""). " WHERE ProductLive = 1 AND (ProductStartDate IS NULL OR ProductStartDate <= CURDATE()) AND (ProductEndDate IS NULL OR ProductEndDate >= CURDATE()) " . ((isset($_SESSION["WADbSearch1_Products_Category_Results"]) && $_SESSION["WADbSearch1_Products_Category_Results"] != "")?$_SESSION["WADbSearch1_Products_Category_Results"]:"") . " GROUP BY coalesce(GroupingID,ps4_products.ProductID) ORDER BY ProductName";
$query_limit_WADAProducts = sprintf("%s LIMIT %d, %d", $query_WADAProducts, $startRow_WADAProducts, $maxRows_WADAProducts);
$WADAProducts = mysql_query($query_limit_WADAProducts, $PowerStoreConnection) or die(mysql_error());
$row_WADAProducts = mysql_fetch_assoc($WADAProducts);

if (isset($_GET['totalRows_WADAProducts'])) {
  $totalRows_WADAProducts = $_GET['totalRows_WADAProducts'];
} else {
  $all_WADAProducts = mysql_query($query_WADAProducts);
  $totalRows_WADAProducts = mysql_num_rows($all_WADAProducts);
$totalPages_WADAProducts = ceil($totalRows_WADAProducts/$maxRows_WADAProducts)-1;

Open in new window

glozinskiOwner, WebmasterAsked:
Who is Participating?
glozinskiOwner, WebmasterAuthor Commented:
i got it working thank you

Could you please provide more info on Products table? Is it same as ps4_products? If so, you are already getting those results.
glozinskiOwner, WebmasterAuthor Commented:
yes,  it is the same table as ps4_products
what you should be reading is "Choose Your Leaves and we will custom build your Trees to Your needs."
If ProductCategoryID=6 therefore ProductCatDesc would be Choose Your Leaves and we will custom build your Trees to Your needs.
thank you
glozinskiOwner, WebmasterAuthor Commented:
I got it wokring myself
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.