Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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, 0' a


pure11

Recommended Posts

Hi im getting this error when i access the reviews.php page.... my reviews isnt working either when you click to view review the product page just reloads:

 

Warning: Division by zero in /home/site/public_html/shop/includes/classes/split_page_results.php on line 59

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, 0' at line 1

 

select r.reviews_id, left(rd.reviews_text, 100) as reviews_text, r.reviews_rating, r.date_added, p.products_id, pd.products_name, p.products_image, r.customers_name from reviews r, reviews_description rd, products p, products_description pd where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and p.products_id = pd.products_id and pd.language_id = '1' and rd.languages_id = '1' and r.approved = '1' order by r.reviews_id DESC limit -0, 0

 

[TEP STOP]

 

 

 

 

can someone help please?

Link to comment
Share on other sites

Hi im getting this error when i access the reviews.php page.... my reviews isnt working either when you click to view review the product page just reloads:

 

Warning: Division by zero in /home/site/public_html/shop/includes/classes/split_page_results.php on line 59

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, 0' at line 1

 

select r.reviews_id, left(rd.reviews_text, 100) as reviews_text, r.reviews_rating, r.date_added, p.products_id, pd.products_name, p.products_image, r.customers_name from reviews r, reviews_description rd, products p, products_description pd where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and p.products_id = pd.products_id and pd.language_id = '1' and rd.languages_id = '1' and r.approved = '1' order by r.reviews_id DESC limit -0, 0

 

[TEP STOP]

 

 

 

 

can someone help please?

 

 

i just want my reviews to work.. the stock reviews oscommerce comes with... since i is\nstalled oscommerce, my reviews has never worked.... anyone?

Link to comment
Share on other sites

Check in your database configuration table... what is MAX_DISPLAY_NEW_REVIEWS set to. I think the default should be 6, but it sounds as though yours could be set to 0. Following the code through perhaps the div by 0 error on line 59 is because $this->number_of_rows_per_page is zero, because $max_rows is zero because splitPageResults() is called with MAX_DISPLAY_NEW_REVIEWS of 0 because it's set to zero in the configuration table.

 

Just a thought.

Link to comment
Share on other sites

Check in your database configuration table... what is MAX_DISPLAY_NEW_REVIEWS set to. I think the default should be 6, but it sounds as though yours could be set to 0. Following the code through perhaps the div by 0 error on line 59 is because $this->number_of_rows_per_page is zero, because $max_rows is zero because splitPageResults() is called with MAX_DISPLAY_NEW_REVIEWS of 0 because it's set to zero in the configuration table.

 

Just a thought.

 

hey there, that fixed the error! thanks allot!!!

 

 

the only problem i have is that on the product page, theres the button to view reivews, once clicked, the page just reloads, any more thoughts?

 

thanks again for the help!!

Link to comment
Share on other sites

hey there, that fixed the error! thanks allot!!!

the only problem i have is that on the product page, theres the button to view reivews, once clicked, the page just reloads, any more thoughts?

 

Well in my database I've got MAX_RANDOM_SELECT_REVIEWS set to 10. If this was instead set to zero, perhaps you wouldn't get any reviews listed? What's yours set to?

 

The code in product_info.php should load product_reviews.php when you hit the button. Strange if yours isn't doing that and stays on the product_info.php page?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...