Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1064 - You have an error in your SQL syntax;


suefin

Recommended Posts

Posted

Sorry if this has already been posted, but I have done several searches and not found a solution.

I am quite new to oscommerce and so far have managed to solve most problems that I have encountered by reading this forum. However, this error has got me stumped.

Yesterday, I decided to add more to my site which caused me major problems, using my back up files I replaced all of the files that had been amended, in order to start again. Anyway to cut a long story short, I have managed to get the site up and running again, however, I have discovered a problem with the shopping cart. When testing the site, I got this message when going to the shopping cart:

 

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 '/ Patch osc-060817 and pa.options_id = '4' at line 3

 

select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from products_options popt, products_options_values poval, products_attributes pa where pa.products_id = '148' // Patch osc-060817 and pa.options_id = '4' // Patch osc-060817 and pa.options_id = popt.products_options_id and pa.options_values_id = '35' // Patch osc-060817 and pa.options_values_id = poval.products_options_values_id and popt.language_id = '1' // Patch osc-060817 and poval.language_id = '1'

 

[TEP STOP]

 

Any ideas on how to fix it, will be greatly appreciated.

Incidently, I have checked the shopping_cart.php for any text containing // Patch osc-060817.

Posted

It's caused by a coding error in the contribution you used. The lines, // Patch osc-060817, are comment lines not meant to be part of the code. But the way they are added makes them part of the code. You will need to remove those comments to fix it. They are in the shopping_cart.php file.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Posted
It's caused by a coding error in the contribution you used. The lines, // Patch osc-060817, are comment lines not meant to be part of the code. But the way they are added makes them part of the code. You will need to remove those comments to fix it. They are in the shopping_cart.php file.

 

Jack

 

Hi Jack

 

Thanks for the speedy reply, I have searched the text for //Patch osc-060817 and cannot find this anywhere.

 

It is driving me mad!

Posted
Hi Jack

 

Thanks for the speedy reply, I have searched the text for //Patch osc-060817 and cannot find this anywhere.

 

It is driving me mad!

 

 

I have just realised that I was looking in the wrong shopping_cart.php :lol:

Having now got rid of the offending //Patch files, my site is now working... woo hoo :-"

 

Once again thank you Jack ;)

 

It is getting late, so now that this is sorted I can now go to bed and get a good nights sleep.

Archived

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

×
×
  • Create New...