Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Newsletter error in Admin


Guest

Recommended Posts

Posted

I'am getting this error in the Newsletter Manager in Admin any suggestions?

 

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]

  • 2 weeks later...
Posted

http://www.oscommerce.com/forums/index.php?sho...26entry697026

 

Answer is in post two...

 

"This is a problem with MySQL 4.1 and osCommerce. In admin/includes/classes/split_page_results.php, around line 37 you'll see these two lines of code:

 

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

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

 

Sandwich these lines of code between the two lines above:

 

if ($offset < 0)

{

$offset = 0 ;

}

 

That should resolve the problem.

 

Vger" <<<< ANSWER/FIX FROM

Archived

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

×
×
  • Create New...