Jump to content

Archived

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

Simplyeasier

1064 - You have an error in your SQL syntax

Recommended Posts

I have the same error in my site.

I've added a Member_Approval_v1.6 form HERE. The error shows up when I click "Activate" at the admin side at Customers-Waiting Aproval-"Client name".

 

Database: MySQL 5.0.51a-log

HTTP Server: Apache/1.3.41 (Unix) PHP/4.4.8 mod_ssl/2.8.31 OpenSSL/0.9.8g

PHP Version: 4.4.8 (Zend: 1.3.0)

 

PLEASE HELP!

 

See the attached screenshots!

 

capture1.jpg

capture2.jpg

Share this post


Link to post
Share on other sites

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

×