Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Nwesletter Manager


astein

Recommended Posts

Posted

Hi,

 

As soon as I click into the Newsletter Manager I receive the following error message:

 

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

 

select newsletters_id, title, length(content) as content_length, module, date_added, date_sent, status, locked from newsletters order by date_added desc limit -6, 6

 

Can someone please advise on how to correct this problem?

 

Thank you!

 

Lee

  • 4 weeks later...
Posted

HELLO I GOT THE SAME ERROR HERE DID YOU GET FIXED THIS. PLEASE HELP ME.

 

 

Hi,

 

As soon as I click into the Newsletter Manager I receive the following error message:

 

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

 

select newsletters_id, title, length(content) as content_length, module, date_added, date_sent, status, locked from newsletters order by date_added desc limit -6, 6

 

Can someone please advise on how to correct this problem?

 

Thank you!

 

Lee

Posted

THIS COMMENT NERVER HELP ANYWAY DEAR!

 

CAN ANYONE QUOTE VERY VERY CLEARLIY PLEASE?

I MEANT VERY VERY CLEAR WHICH FILE TO MODIFY OR WHAT TO UPDATE

 

what mysql is your host using is there something missing at end of line like a 'or ) or;
Posted

It's working Perfectly if you do below modification

 

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;

Archived

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

×
×
  • Create New...