Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted (edited)
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 'limit 0, 20' at line 1

 

select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from orders o left join orders_total ot on (o.orders_id = ot.orders_id), orders_status s where o.orders_status = s.orders_status_id and s.language_id = '1' and ot.class = 'ot_total' order by limit 0, 20

 

The above error is found in my admin control panel under Customers / Orders

 

I very carefully followed all the edits and instructions. The mysql edit was added and the previous paypal module was uninstalled prior.

 

The only other module I had installed is the The WebMakers Corner FREE CHARGE CARD. This error occurs whether I remove the Webmakers module or not.

 

Currently my processed order test works. The ONLY thing I noticed was this error in the admin orders area. As far as my test client is concerned their order is ready and their payment had been processed.

 

However, I am still unable to find out how/where to enable Downloads after payment process. I have searched the forum and read everything.. nothing seems obvious to me. All of my products are digital goods. Downloading after payment is necissary.

 

Any help you might provide would be very appreciated.

I'm hoping it's a simple fix.

Edited by LadyLarke
Posted

This is a known bug (it's listed in the db portion of the bug reports) but here is the fix for it.

 

in admin/includes/classes/split_page_results.php

 

find:

 

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

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

 

(about line 38)

Replace with the following code:

 

 

$offset = 0;

if($current_page_number > 0){

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

}

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

 

 

In Catalog/includes/classes/split_page_results.php

 

Find:

$this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page;

 

(around line 66)

 

insert before it:

 

if($offset <0 ) $offset = 0;

 

That should take care of the problem for you. If not refer to the bug report area to see if there are additonal solutions for you.

 

Have a great day,

 

Ruth in AZ

 

 

The above error is found in my admin control panel under Customers / Orders

 

I very carefully followed all the edits and instructions. The mysql edit was added and the previous paypal module was uninstalled prior.

 

The only other module I had installed is the The WebMakers Corner FREE CHARGE CARD. This error occurs whether I remove the Webmakers module or not.

 

Currently my processed order test works. The ONLY thing I noticed was this error in the admin orders area. As far as my test client is concerned their order is ready and their payment had been processed.

 

However, I am still unable to find out how/where to enable Downloads after payment process. I have searched the forum and read everything.. nothing seems obvious to me. All of my products are digital goods. Downloading after payment is necissary.

 

Any help you might provide would be very appreciated.

I'm hoping it's a simple fix.

Posted

Thank you rwoody for taking the time to reply to my query. Your suggestion did not work for me.

 

However, you did get me to look in the right area for the correct fix. I tried a few until I found Admin OrderTotal Fix.

 

The issue seems to now be resolved.

Posted
Thank you rwoody for taking the time to reply to my query. Your suggestion did not work for me.

 

However, you did get me to look in the right area for the correct fix. I tried a few until I found Admin OrderTotal Fix.

 

The issue seems to now be resolved.

I'm glad that even though my suggestion was not the correct one... it did lead you to find what you needed.

 

Take care and have a super day.

 

Ruth in AZ

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...