Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

SQL Variant error

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-10-2005, 06:07 PM
  Hyperdelicious's Avatar 
Hyperdelicious Hyperdelicious is offline
 

Senior Member
  
Join Date: Sep 2002
Location: In the Middle of Nowhere
Posts: 138
 

Default SQL Variant error

The following SQL error is returned on products which have options with variants...

Code:
INVALID SQL: 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 'HAVING avail > 0' at line 1 SQL QUERY FAILURE: SELECT xcart_variants.variantid, xcart_variants.weight, xcart_variants.productcode, MIN(xcart_pricing.price) as price , xcart_variants.avail FROM xcart_pricing, xcart_variants WHERE xcart_pricing.quantity = 1 AND xcart_pricing.membership = '' AND xcart_pricing.variantid = xcart_variants.variantid AND xcart_pricing.productid = '27' GROUP BY xcart_pricing.variantid ORDER BY price HAVING avail > 0

any ideas?

xcart - 4.1.3
Reply With Quote
  #2  
Old 06-13-2005, 05:54 AM
  Hyperdelicious's Avatar 
Hyperdelicious Hyperdelicious is offline
 

Senior Member
  
Join Date: Sep 2002
Location: In the Middle of Nowhere
Posts: 138
 

Default Product options with variants SQL error

I think this has something to do with the sort by function -- Any ideas?
Reply With Quote
  #3  
Old 06-14-2005, 10:13 AM
 
memdy memdy is offline
 

Newbie
  
Join Date: Apr 2004
Location: Tampa, Florida
Posts: 7
 

Default

I get the same error on a new customer install when I add the products as featured products to the home page.

Quote:
INVALID SQL: 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 'HAVING avail > 0' at line 1
SQL QUERY FAILURE: SELECT xcart_variants.variantid, xcart_variants.weight, xcart_variants.productcode, MIN(xcart_pricing.price) as price , xcart_variants.avail FROM xcart_pricing, xcart_variants WHERE xcart_pricing.quantity = 1 AND xcart_pricing.membership = '' AND xcart_pricing.variantid = xcart_variants.variantid AND xcart_pricing.productid = '16127' GROUP BY xcart_pricing.variantid ORDER BY price HAVING avail > 0

X-Cart version 4.0.13
PHP 4.3.10 Details >>
MySQL server 4.0.23a
MySQL client 3.23.58
Web server Apache/2.0.40 (Red Hat Linux)
Operation system Linux
Perl not found Details >>
XML parser (expat) found
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:47 AM.

   

 
X-Cart forums © 2001-2020