Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error with wish list


Debbie

Recommended Posts

I uploaded all and everything seems to be working fine except, if the wishlist is empty instead of saying its empty it is saying this..

 

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

 

select * from customers_wishlist where customers_id = '19' order by products_name limit -12, 12

 

[TEP STOP]

 

 

If an item is added then it doesnt show any errors and appears to work fine.

Any one know how i can fix this?

Link to comment
Share on other sites

I uploaded all and everything seems to be working fine except, if the wishlist is empty instead of saying its empty it is saying this..

 

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

 

select * from customers_wishlist where customers_id = '19' order by products_name limit -12, 12

 

[TEP STOP]

If an item is added then it doesnt show any errors and appears to work fine.

Any one know how i can fix this?

 

Any one able to help? i have been trying all night and not getting anywhere at all ;)

Link to comment
Share on other sites

  • 1 month later...
Any one able to help? i have been trying all night and not getting anywhere at all  ;)

 

After spending several frustrating hours searching through the various boards I was able to fix this error by changing the following in /includes/classes/split_page_results.php at around line 65.

 

CHANGE THIS:

 

$offset = ($this->number_of_rows_per_page * ($this->current_page_number - 1));

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

}

 

 

TO THIS:

 

$offset = ($this->number_of_rows_per_page * ($this->current_page_number - 1));

if ($offset < 0)

{

$offset = 0 ;

}

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

}

 

 

 

I hope this helps,

Barbara

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.

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