Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1064 - You have an error in your SQL syntax


Guest

Recommended Posts

Posted

I keep getting this message when I try to load new products:

 

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

 

select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from products p, products_description pd, specials s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and s.status = '1' order by s.specials_date_added DESC limit -9, 9

 

[TEP STOP]

 

Any ideas as to what the problem/solution is?

 

Have tried Bug report but no joy.

 

Sean

Posted
I keep getting this message when I try to load new products:

 

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

 

select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from products p, products_description pd, specials s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and s.status = '1' order by s.specials_date_added DESC limit -9, 9

 

[TEP STOP]

 

Any ideas as to what the problem/solution is?

 

Have tried Bug report but no joy.

 

Sean

 

Check this post: http://www.oscommerce.com/forums/index.php?sho...mp;#entry697026

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Posted

Thanks for that djmonkey1.

 

I can find what I need to change but when I go to edit I get the following message.

 

Error: I can not write to this file. Please set the right user permissions on: /hsphere/local/home/includes/classes/split_page_results.php

 

Do I need a different password to edit?

 

Sean

Posted

Have no idea, am not a techie. Am able to follow instruction though!

 

I logged into oscommerce using normal password, went to files and followed path. When I tried to edit, I got that message. Any ideas?

Posted

You're using the osC file manager then. You don't have write permission granted to osCommerce for that file (which, for security, is how it should be). File manager is not a good way to modify your files. It would be better to use an FTP program such as WS_FTP, Dreamweaver, etc on your local computer instead of editing the files directly via the osCommerce file manager.

 

If you can't get ahold of an FTP program you'll have to find out how to change the permissions for your files/folders. I can tell you how to do it using WS_FTP or Dreamweaver, otherwise check with your webhost.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Posted
You're using the osC file manager then. You don't have write permission granted to osCommerce for that file (which, for security, is how it should be). File manager is not a good way to modify your files. It would be better to use an FTP program such as WS_FTP, Dreamweaver, etc on your local computer instead of editing the files directly via the osCommerce file manager.

 

If you can't get ahold of an FTP program you'll have to find out how to change the permissions for your files/folders. I can tell you how to do it using WS_FTP or Dreamweaver, otherwise check with your webhost.

 

 

Thanks for that. Used Smart FTP and got rid of message.

 

One other thing though, I thought they were related. I have added a warehouse section and have listed sub-sections for different product categories. For some reason, there is a row running down the page of the letter n This has happened on a few other pages also. Any ideas?

Posted
Thanks for that. Used Smart FTP and got rid of message.

 

One other thing though, I thought they were related. I have added a warehouse section and have listed sub-sections for different product categories. For some reason, there is a row running down the page of the letter n This has happened on a few other pages also. Any ideas?

 

You used the file manager to upload those pages. Rule #1: Don't Use Osc's File Manager. :)

 

Use SmartFTP to re-upload the pages and the n's should go away (it has something to do with the encoding of the \ symbol such that \n is interpreted as an n instead of a line break- perhaps an extra slash is added?).

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Archived

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

×
×
  • Create New...