Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to fix Newsletter Manager ?


Yovav

Recommended Posts

Dear all.

 

I get this error on Admin -> Newsletter Manager:

 

 

Newsletter Manager

 

Newsletters Size Module Sent Status Action

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 newsletters_id, title, length(content) as content_length, module, date_added, date_sent, status, locked from newsletters order by date_added desc limit -20, 20

 

[TEP STOP]

 

 

 

How can I fix it ?

Thank you for reading

Best Regards - Yovav Gad

Link to comment
Share on other sites

Thanks! - the bottom post worked for me:

 

 

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;

Thank you for reading

Best Regards - Yovav Gad

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...