benelson Posted February 22, 2009 Share Posted February 22, 2009 Hi all this is my first of many posts here I hope! I just installed the contribution Complete Reviews System, the "Complete Reviews System with Star Rating System" package. It works great. I then attempted to install the extremely simple "Complete Reviews System (Admin) V1.5.txt" package. The contribution can be found at: http://addons.oscommerce.com/info/4397 After installing the new admin addon I get the following error in the "Reviews" page in the admin area: Warning: Division by zero in /home/lightzom/public_html/teststore/admin/includes/classes/split_page_results.php on line 33 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-0, MAX_SEARCH_RESULTS_ADMIN' at line 1 select reviews_id, products_id, last_modified, reviews_rating, approved, date_added from reviews order by date_added DESC limit -0, MAX_SEARCH_RESULTS_ADMIN I tried to find what is causing the error in the admin/reviews.php file that is completely replaced and in the modified file admin/includes/functions/html_output.php . Neither of which look like they would produce this error. I'm sorry if this is an overly simple fix but I can't seem to figure it out and didn't see a topic already created for this contribution. Thanks! Quote Link to comment Share on other sites More sharing options...
Guest Posted February 22, 2009 Share Posted February 22, 2009 Sounds like you're on an unpatched version of osCommerce. There is a fix for split_page_results.php, both the catalog and the admin version, specifically for this error. In both files, change this: $sql_query .= " limit " . $offset . ", " . $max_rows_per_page; to this: $sql_query .= " limit " . max($offset, 0) . ", " . $max_rows_per_page; You should strongly consider applying the current patches. -jared Quote Link to comment Share on other sites More sharing options...
benelson Posted February 22, 2009 Author Share Posted February 22, 2009 Hey Jared thanks for the reply! I just went into both files and they were both already updated with the line you said to change. The admin page reads: $offset = ($max_rows_per_page * ($current_page_number - 1)); $sql_query .= " limit " . max($offset, 0) . ", " . $max_rows_per_page; The catalog one reads: $offset = ($this->number_of_rows_per_page * ($this->current_page_number - 1)); $this->sql_query .= " limit " . max($offset, 0) . ", " . $this->number_of_rows_per_page; Quote Link to comment Share on other sites More sharing options...
galey1981 Posted March 1, 2009 Share Posted March 1, 2009 Hi Ben - did you fix the Issue with Complete Reviews System Contribution - i have EXACTLY the same problem :rolleyes: Quote Link to comment Share on other sites More sharing options...
jwilkins Posted March 6, 2009 Share Posted March 6, 2009 Hi All - have any of you located a way to fix the issue with the Complete Reviews System as stated above? I too have the same problem and have spent the past two hours searching the forums for an answer, but to no avail! Your help or guidance would be greatly apprciated! James Quote Link to comment Share on other sites More sharing options...
benelson Posted March 6, 2009 Author Share Posted March 6, 2009 Hey James we still haven't figured out the answer to this problem. We are still just using the unupdated version. Quote Link to comment Share on other sites More sharing options...
jwilkins Posted March 7, 2009 Share Posted March 7, 2009 Hi Ben - Thanks for getting back to me so quickly! It looks like I'll have to do the same until I can find/work out a fix. I'll post anything I find! Cheers James Quote Link to comment Share on other sites More sharing options...
seank123 Posted May 18, 2009 Share Posted May 18, 2009 Found elsewhere: In your /admin/includes/configure.php add this: define('MAX_SEARCH_RESULTS_ADMIN', '20'); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.