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

    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
    12,399
    Plugin Contributions
    87

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

    What does the variable $reviews_status contain?

 

 

Similar Threads

  1. v150 Displaying links for number of reviews
    By Liamv in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 20 May 2014, 09:19 PM
  2. v151 Which Function gerates the URL for a given product?
    By chadderuski in forum General Questions
    Replies: 4
    Last Post: 11 Feb 2013, 10:02 PM
  3. 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
  4. Number of product reviews in sidebox
    By seentvcanada in forum Addon Sideboxes
    Replies: 3
    Last Post: 28 Dec 2010, 02:35 AM
  5. Replies: 6
    Last Post: 19 Sep 2008, 04:08 AM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR