Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Mysql error


Fasat Eddy Felson

Recommended Posts

Hello peeps,

I deleted all the manufacturers and now I get this error in manufacturers admin. Can anyone tell me what I did wrong? :-"

 

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 manufacturers_id, manufacturers_name, manufacturers_image, date_added, last_modified from manufacturers order by manufacturers_name limit -20, 20

Link to comment
Share on other sites

I only just installed it and it was last week when I downloaded it? but I will download again and reinstall

That is weird, since with the November 13 updated version this was one of the first things mentioned to have been solved (see update-20051113.txt):

------------------------------------------------------------------------------
limit -20, 20
http://www.oscommerce.com/community/bugs,1605
------------------------------------------------------------------------------

Problem:

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

Solution:

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;

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...