Need to Display a Category from Database

Posted on 2011-10-12
Last Modified: 2012-05-12
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

Question by:glozinski
    LVL 13

    Expert Comment


    Could you please provide more info on Products table? Is it same as ps4_products? If so, you are already getting those results.

    Author Comment

    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

    Accepted Solution

    i got it working thank you

    Author Closing Comment

    I got it wokring myself

    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    Suggested Solutions

    APEX (Application Express) is used to develop a web application from Oracle. SQL Workshop is one of the tools that comes with Oracle APEX to query or modify the database objects or to make any changes to the structure.
    Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
    This video teaches users how to migrate an existing Wordpress website to a new domain.
    The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now