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

invalid sql error message

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-26-2006, 06:44 AM
 
mmoskva mmoskva is offline
 

eXpert
  
Join Date: Aug 2005
Location: Pennsylvania
Posts: 306
 

Default invalid sql error message

My cart was running great yesterday, but when I looked at it today I see a list of sql error messages and I cannot understand why? can someone explain?

Admin side:

INVALID SQL: 0 :
SQL QUERY FAILURE: SELECT IF (L1.value IS NOT NULL, L1.value, IF (L2.value IS NOT NULL, L2.value, L3.value) ) AS country, xcart_countries.code as country_code, xcart_countries.display_states, xcart_countries.region FROM xcart_countries LEFT JOIN xcart_languages L1 ON L1.name = CONCAT('country_',xcart_countries.code) AND L1.code = 'US' LEFT JOIN xcart_languages L2 ON L2.name = CONCAT('country_',xcart_countries.code) AND L2.code = 'US' LEFT JOIN xcart_languages L3 ON L3.name = CONCAT('country_',xcart_countries.code) AND L3.code = 'US' WHERE xcart_countries.active='Y' ORDER BY country


Customer side:

INVALID SQL: 0 :
SQL QUERY FAILURE: SELECT xcart_products.*, MIN(xcart_pricing.price) as price , xcart_products_lng.product as product_lng, xcart_products_lng.descr as descr_lng, xcart_products_lng.full_descr as fulldescr_lng, IF(xcart_variants.variantid IS NOT NULL,'Y','') as is_variant, IF(xcart_classes.classid IS NOT NULL,'Y','') as is_product_options, MIN(v_pricing.price) as v_price FROM xcart_products, xcart_pricing , xcart_featured_products, xcart_products_categories, xcart_categories LEFT JOIN xcart_products_lng ON xcart_products_lng.productid = xcart_products.productid AND xcart_products_lng.code = 'US' LEFT JOIN xcart_classes ON xcart_classes.productid = xcart_products.productid LEFT JOIN xcart_variants ON xcart_variants.productid = xcart_products.productid LEFT JOIN xcart_pricing as v_pricing ON v_pricing.variantid = xcart_variants.variantid AND v_pricing.quantity = 1 AND v_pricing.membership IN ('','') WHERE xcart_products.productid=xcart_featured_products.p roductid AND xcart_featured_products.avail='Y' AND xcart_featured_products.categoryid='0' AND xcart_pricing.productid=xcart_products.productid AND xcart_pricing.quantity=1 AND xcart_pricing.membership IN ('','') AND xcart_products.product_type <> 'C' AND xcart_products.product_type <> 'B' AND xcart_pricing.variantid = 0 AND xcart_products_categories.productid=xcart_products .productid AND xcart_products_categories.categoryid = xcart_categories.categoryid AND xcart_categories.membership IN ('','') AND xcart_categories.avail = 'Y' AND xcart_products.forsale='Y' GROUP BY xcart_products.productid ORDER BY xcart_featured_products.product_order, xcart_products.product ASC LIMIT 0, 10
__________________
x-cart 4.0.16v
linux server
Reply With Quote
  #2  
Old 06-26-2006, 07:28 AM
  frankdux's Avatar 
frankdux frankdux is offline
 

Senior Member
  
Join Date: Jul 2004
Location: Manchester, NH, USA
Posts: 125
 

Default

Did your host upgrade your version of MySQL by any chance?
__________________
X-Cart: 4.0.18
Linux, Apache, MySQL: 4.1.16, PHP: 4.4.2
Reply With Quote
  #3  
Old 06-26-2006, 08:43 AM
 
mmoskva mmoskva is offline
 

eXpert
  
Join Date: Aug 2005
Location: Pennsylvania
Posts: 306
 

Default

I am not sure? Is that the case, or could their be a bug in the system?
__________________
x-cart 4.0.16v
linux server
Reply With Quote
  #4  
Old 06-26-2006, 09:11 AM
  frankdux's Avatar 
frankdux frankdux is offline
 

Senior Member
  
Join Date: Jul 2004
Location: Manchester, NH, USA
Posts: 125
 

Default

You could probably start by making a PHP info page to determine what version of MySQL is running.

Just upload a PHP file with the following code:

Code:
<?php phpinfo(); ?>

Then go to that page and look for your MySQL version.

Alternatively, if you have shell access, run the following command:

mysql -V
__________________
X-Cart: 4.0.18
Linux, Apache, MySQL: 4.1.16, PHP: 4.4.2
Reply With Quote
  #5  
Old 06-26-2006, 10:12 AM
 
mmoskva mmoskva is offline
 

eXpert
  
Join Date: Aug 2005
Location: Pennsylvania
Posts: 306
 

Default

I did what you mentioned and there are my results if you can take a look.

Code:
MYSQL Version: mysql MySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version 4.1.19 MYSQL_MODULE_TYPE external MYSQL_SOCKET /var/lib/mysql/mysql.sock MYSQL_INCLUDE -I/usr/include/mysql MYSQL_LIBS -L/usr/lib -lmysqlclient

I am a little confused by what mean if I have shell access. How would I run the mysql-V command?

--------
What do I do now since I have the php information?
__________________
x-cart 4.0.16v
linux server
Reply With Quote
  #6  
Old 06-26-2006, 10:19 AM
  frankdux's Avatar 
frankdux frankdux is offline
 

Senior Member
  
Join Date: Jul 2004
Location: Manchester, NH, USA
Posts: 125
 

Default

Well for starters you've probably eliminated the possibility that your host upgraded to a version of MySQL that broke your X-cart. MySQL 4.1.19 is compatible. Now what I would ask you is can you think of anything else that changed recently in your site?

As for shell access, I just meant logging into your server's operating system and running a command like mysql -V. I wouldn't worry about it because you were already able to get your MySQL version without using this method.
__________________
X-Cart: 4.0.18
Linux, Apache, MySQL: 4.1.16, PHP: 4.4.2
Reply With Quote
  #7  
Old 06-26-2006, 10:26 AM
 
mmoskva mmoskva is offline
 

eXpert
  
Join Date: Aug 2005
Location: Pennsylvania
Posts: 306
 

Default

Q. If the host had broke my xcart, what would I have to do?


RE:
I was changing the table design of the orders.tpl in the admin yesterday; but I reverted the original file back yesterday so that would not be the problem.

I dont know? these errors are not normal? you think that it is a bug?
__________________
x-cart 4.0.16v
linux server
Reply With Quote
  #8  
Old 06-26-2006, 10:54 AM
  frankdux's Avatar 
frankdux frankdux is offline
 

Senior Member
  
Join Date: Jul 2004
Location: Manchester, NH, USA
Posts: 125
 

Default

If you are getting SQL error messages in both the admin and customer side, then you changing the table in orders.tpl probably had nothing to do with it.

Maybe your host's MySQL database server is down? You might want to contact them and ask them if there have been any problems or changes made to there MySQL setup.
__________________
X-Cart: 4.0.18
Linux, Apache, MySQL: 4.1.16, PHP: 4.4.2
Reply With Quote
  #9  
Old 06-26-2006, 11:05 AM
 
mmoskva mmoskva is offline
 

eXpert
  
Join Date: Aug 2005
Location: Pennsylvania
Posts: 306
 

Default

ok i will try that; what about a bug?
__________________
x-cart 4.0.16v
linux server
Reply With Quote
  #10  
Old 06-26-2006, 11:09 AM
  frankdux's Avatar 
frankdux frankdux is offline
 

Senior Member
  
Join Date: Jul 2004
Location: Manchester, NH, USA
Posts: 125
 

Default

If it was working fine and then not working, then it makes it seem like some change took place, not a bug. That's my best guess.
__________________
X-Cart: 4.0.18
Linux, Apache, MySQL: 4.1.16, PHP: 4.4.2
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 01:21 PM.

   

 
X-Cart forums © 2001-2020