Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    354
    Plugin Contributions
    1

    Default Counting the total number of reviews for a given product.

    I trying to pull the total number of reviews for a template and for some reason I keep getting one no matter what even though there's at least 2.

    Can anyone help?


    PHP Code:
    $reviews_query_raw "SELECT r.reviews_id, rd.reviews_text as reviews_text, r.reviews_rating, r.date_added, r.customers_name
                            FROM " 
    TABLE_REVIEWS " r, " TABLE_REVIEWS_DESCRIPTION " rd
                            WHERE r.products_id = :productsID
                            AND r.reviews_id = rd.reviews_id
                            AND rd.languages_id = :languagesID " 
    $review_status "
                            ORDER BY r.reviews_id desc"
    ;

      
    $reviews_query_raw $db->bindVars($reviews_query_raw':productsID'$_GET['products_id'], 'integer');
      
    $reviews_query_raw $db->bindVars($reviews_query_raw':languagesID'$_SESSION['languages_id'], 'integer');
      
    $reviews_split = new splitPageResults($reviews_query_rawMAX_DISPLAY_NEW_REVIEWS);
      
    $reviews $db->Execute($reviews_split->sql_query); 

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    1,939
    Plugin Contributions
    20

    Default Re: Counting the total number of reviews for a given product.

    What does the variable $reviews_status contain?

 

 

Similar Threads

  1. Limited the total number of sales of a downloadable product?
    By acpaulley in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 22 Mar 2011, 04:22 AM
  2. Number of product reviews in sidebox
    By seentvcanada in forum Addon Sideboxes
    Replies: 3
    Last Post: 28 Dec 2010, 02:35 AM
  3. Showing Total Number of Product Listed
    By yosemirza in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 22 Jan 2010, 09:45 AM
  4. Question about product quantity counting
    By achan560 in forum General Questions
    Replies: 1
    Last Post: 20 Jan 2009, 12:55 PM
  5. Product list counting 1 too many
    By blackroom in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 19 Jul 2007, 09:52 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •