Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Discount Coupon - 1064 - You have an error in your SQL syntax


OpusVista

Recommended Posts

I am getting the following error when i try to use Discount Coupon

 

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 '-10, 10' at line 1

 

select * from discount_coupons cd order by cd.coupons_date_end, coupons_date_start limit -10, 10

Link to comment
Share on other sites

I got this from another thread here.

 

Try this:

 

In the file admin/includes/classes/split_page_results.php

 

Insert:

 

if ($offset < 0)

{

$offset = 0 ;

}

 

Just before this line:

 

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

}

 

 

 

If you see the errors displayed on your store pages (not in the admin), you might also need to make this change in /includes/classes/split_page_results.php

 

Insert:

 

if ($offset < 0)

{

$offset = 0 ;

}

 

Just before this line:

 

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

Link to comment
Share on other sites

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...