Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1064 - You have an error in your SQL syntax


Simplyeasier

Recommended Posts

  • 5 months later...
  • Replies 354
  • Created
  • Last Reply

Mine already have the ' max($offset, 0) ' in the code .

 

I fixed it by adding the code below. I still need to monitor more but it works at the moment.

 

Try this and see whether it also works for you. Fingers cross. ;)

 

/admin/includes/classes/split_page_results.php

 

/* START */

if ($max_rows_per_page <= 0)

{

$max_rows_per_page=max($max_rows_per_page,12); // 12 can be changed to your prefered numbers per page

 

}

/* END*/

$num_pages = ceil($query_num_rows / $max_rows_per_page);

if ($current_page_number > $num_pages) {

$current_page_number = $num_pages;

}

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

$sql_query .= " limit " . max($offset, 0) . ", " . $max_rows_per_page;

}

Link to comment
Share on other sites

  • 6 months later...

I have read many other posts but i cannot get the problem fixed. my error only appears when I click on a product, the error appears on the product_info.php. This error only appears since the time I updated from version 2.2 to version 2.31:

 

 

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 '= '203' and status = 1' at line 1

 

select specials_new_products_price from specialswhere products_id = '203' and status = 1

 

[TEP STOP]

 

Thank you for every hint or advices .

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...