News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Error 1064 for product sorting by price

Started by kabelo, October 18, 2015, 03:15:57 AM

Previous topic - Next topic

kabelo

please help i get this error when every time after i change my product sorting settings to sort by price.


Error: 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 'PTC3670RD" ORDER BY product_price DESC LIMIT 1' at line 1 SQL=SELECT p.`virtuemart_product_id`, `l`.`product_name` FROM `in872_virtuemart_products` as p INNER JOIN `in872_virtuemart_products_en_gb` as l using (`virtuemart_product_id`) LEFT JOIN `in872_virtuemart_product_shoppergroups` as ps ON p.`virtuemart_product_id` = `ps`.`virtuemart_product_id` LEFT JOIN `in872_virtuemart_product_categories` as pc ON p.`virtuemart_product_id` = `pc`.`virtuemart_product_id` LEFT JOIN `in872_virtuemart_product_prices` as pp ON p.`virtuemart_product_id` = pp.`virtuemart_product_id` WHERE ( `pc`.`virtuemart_category_id` = 59 AND ( `ps`.`virtuemart_shoppergroup_id`= "1" OR `ps`.`virtuemart_shoppergroup_id` IS NULL ) AND p.`published`="1" ) AND p.`virtuemart_product_id`!="1501" AND product_price <= "Tablet case Prestigio 7" PTC3670RD" ORDER BY product_price DESC LIMIT 1

what does this mean how can i fix?

Vm 3.0.9

GJC Web Design

#1
aside from how something can be <= to "Tablet case Prestigio 7" PTC3670RD"  the problem is the 7"

The " is breaking the query

The " should be encoded...  in my installs if I enter a " in the title field it is..  perhaps this is because your on 3.0.9 .. well out of date -- try at least 3.0.10
with all normal health warnings .. or you are entering this data directly in the DB? (import) ?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

kabelo

#2
ive now tried upgrading too never helped a thing...and the funny part is everything works fine when the sorting setting is set to ordering, but when i set to price i get this error on some of my products...

And GJC Web Design

i have noticed that any product name that has an inch sign but has no dot in between eg (8") gives that sql error 1064 but if a dot is added in between like (8.0") works just fine

i sell tablets so size is very important to my clients.

i also put my products via an import tool...

GJC Web Design

if your directly importing the " should be a  &#34; I think
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

kabelo

ive seen that today about an hour ago i dont remember what i clicked, but that doesnt show after i import.

i have modified my last reply  but i included it below:

i have noticed that any product name that has an inch sign but has no dot in between eg (8") gives that sql error 1064 but if a dot and a digit is added in between like (8.0") works just fine

i sell tablets so size is very important to my clients.


GJC Web Design

what import?  If u want help provide information!

If your importing directly " to the DB then that is what is there... try as above
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

kabelo

Im not an advance user so i dont really know what to give in advance, but i can tell you i use "vm excel like import" program, i dont have any deep info about it all i know is it makes things easy for me..

GJC Web Design

Never heard of it .. have you tried replacing the " with a   &#34;             ?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation