Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

sql error 1064


bayerl

Recommended Posts

get this message in customers and another part of my admin error all the time. not to sure what i means sorry. any ideas?

 

Customers Search:

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 c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, a.entry_country_id from customers c left join address_book a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id order by c.customers_lastname, c.customers_firstname limit -20, 20

 

[TEP STOP]

Link to comment
Share on other sites

$offset = ($this->number_of_rows_per_page * ($this->current_page_number - 1));

 

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

 

 

i found this line, and change it to

 

$offset = ($max_rows_per_page * ($current_page_number - 1));

if ($offset < 0)

{

$offset = 0 ;

}

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

 

 

didnt seem to help tho

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...