Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Errors when deleting all specials


Guest

Recommended Posts

Hi there,

 

I installed OScommerce and deleted all specials, when going to the admin page and choose 'specials' I get the following errors:

 

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

 

select p.products_id, pd.products_name, p.products_price, s.specials_id, s.specials_new_products_price, s.specials_date_added, s.specials_last_modified, s.expires_date, s.date_status_change, s.status from products p, specials s, products_description pd where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = s.products_id order by pd.products_name limit -20, 20

 

[TEP STOP]

 

I searched the posts but can't find anything that helps.. ..maybe I'm looking in the wrong places as I just can't beleave I am the first trying to delete all specials.

 

gr. LuluM

Link to comment
Share on other sites

Hi there,

 

I installed OScommerce and deleted all specials, when going to the admin page and choose 'specials' I get the following errors:

 

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

 

select p.products_id, pd.products_name, p.products_price, s.specials_id, s.specials_new_products_price, s.specials_date_added, s.specials_last_modified, s.expires_date, s.date_status_change, s.status from products p, specials s, products_description pd where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = s.products_id order by pd.products_name limit -20, 20

 

[TEP STOP]

 

I searched the posts but can't find anything that helps.. ..maybe I'm looking in the wrong places as I just can't beleave I am the first trying to delete all specials.

 

gr. LuluM

 

 

Add special for one product then see specials in admin

 

Regards,

veera

Link to comment
Share on other sites

Thanks veera,

 

But what if I don't have any specials? Should there always be at least 1 special available?

furthermore.. how do i add a special when this error appears?

 

Thanks for your fast reply sofar!

 

gr. LuluM

Link to comment
Share on other sites

Thanks veera,

 

But what if I don't have any specials? Should there always be at least 1 special available?

furthermore.. how do i add a special when this error appears?

 

Thanks for your fast reply sofar!

 

gr. LuluM

 

29 Sep 2005 19:21:49 hpdl (AT) oscommerce (DOT) com

 

Thanks for the report, here is the official fix:

 

Line 67 in catalog/includes/classes/split_page_results.php must be changed from:

 

$this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page;

 

to:

 

$this->sql_query .= " limit " . max($offset, 0) . ", " . $this->number_of_rows_per_page;

 

Line 38 in catalog/admin/includes/classes/split_page_results.php must be changed from:

 

$sql_query .= " limit " . $offset . ", " . $max_rows_per_page;

 

to:

 

$sql_query .= " limit " . max($offset, 0) . ", " . $max_rows_per_page;

Treasurer MFC

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...