Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Archived

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

Simplyeasier

1064 - You have an error in your SQL syntax

Recommended Posts

thank you so much...!!! you are great I was looking for this solution so much thank thank thank you!

Share this post


Link to post
Share on other sites

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;

}

Share this post


Link to post
Share on other sites

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 .

Share this post


Link to post
Share on other sites

×