Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Help Data Base Error Rate Topic   - - - - -

 
  • charlygto
  • Junior Member
  • Members
  • Join Date: 01-Jul 10
  • 22 posts

Posted 27 November 2015 - 11:38 AM #1

Hello since today my cs cart show this register every second :

 

 

 
Database (error)
Error: 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 '-1' at line 1 <b>(1064)</b>
Query: SELECT SQL_CALC_FOUND_ROWS products.*, IF(shared_descr.product_id IS NOT NULL, shared_descr.product, descr1.product) as product, IF(shared_prices.product_id IS NOT NULL,MIN(IF(shared_prices.percentage_discount = 0, shared_prices.price, shared_prices.price - (shared_prices.price * shared_prices.percentage_discount)/100)),MIN(IF(prices.percentage_discount = 0, prices.price, prices.price - (prices.price * prices.percentage_discount)/100))) as price, IF(shared_descr.product_id IS NOT NULL, shared_descr.short_description, descr1.short_description) as short_description, IF(shared_descr.product_id IS NOT NULL, IF(shared_descr.short_description = '', shared_descr.full_description, ''), IF(descr1.short_description = '', descr1.full_description, '')) as full_description, GROUP_CONCAT(IF(products_categories.link_type = 'M', CONCAT(products_categories.category_id, 'M'), products_categories.category_id)) as category_ids, products_categories.position, IF(shared_descr.product_id IS NOT NULL, shared_descr.meta_keywords, descr1.meta_keywords) as meta_keywords, IF(shared_descr.product_id IS NOT NULL, shared_descr.meta_description, descr1.meta_description) as meta_description, IF(shared_descr.product_id IS NOT NULL, shared_descr.search_words, descr1.search_words) as search_words, IF(shared_descr.product_id IS NOT NULL, shared_descr.promo_text, descr1.promo_text) as promo_text, cscart_supplier_links.supplier_id, cscart_seo_names.name as seo_name, cscart_seo_names.path as seo_path, AVG(cscart_discussion_rating.rating_value) AS average_rating, cscart_discussion.type AS discussion_type, cscart_discussion.thread_id AS discussion_thread_id FROM cscart_products as products LEFT JOIN cscart_product_descriptions as descr1 ON descr1.product_id = products.product_id AND descr1.lang_code = 'es' LEFT JOIN cscart_product_prices as prices ON prices.product_id = products.product_id AND prices.lower_limit = 1 INNER JOIN cscart_products_categories as products_categories ON products_categories.product_id = products.product_id INNER JOIN cscart_categories ON cscart_categories.category_id = products_categories.category_id AND (cscart_categories.usergroup_ids = '' OR FIND_IN_SET(0, cscart_categories.usergroup_ids) OR FIND_IN_SET(1, cscart_categories.usergroup_ids)) AND cscart_categories.status IN ('A', 'H') INNER JOIN cscart_products_categories as products_categories_filter ON products_categories_filter.product_id = products.product_id INNER JOIN cscart_categories AS categories_filter ON categories_filter.category_id = products_categories_filter.category_id AND (categories_filter.usergroup_ids = '' OR FIND_IN_SET(0, categories_filter.usergroup_ids) OR FIND_IN_SET(1, categories_filter.usergroup_ids)) AND categories_filter.status IN ('A', 'H') LEFT JOIN cscart_ult_product_descriptions shared_descr ON shared_descr.product_id = products.product_id AND shared_descr.company_id = 1 AND shared_descr.lang_code = 'es' LEFT JOIN cscart_ult_product_prices as shared_prices ON shared_prices.product_id = products.product_id AND shared_prices.lower_limit = 1 AND shared_prices.usergroup_id IN (0, 0, 1) AND shared_prices.company_id = 1 LEFT JOIN cscart_supplier_links ON cscart_supplier_links.object_id = products.product_id AND cscart_supplier_links.object_type = 'P' LEFT JOIN cscart_seo_names ON cscart_seo_names.object_id = products.product_id AND cscart_seo_names.type = 'p' AND cscart_seo_names.dispatch = '' AND cscart_seo_names.lang_code = 'es' AND ( cscart_seo_names.company_id = 1 OR cscart_seo_names.company_id = 0) LEFT JOIN cscart_discussion ON cscart_discussion.object_id = products.product_id AND cscart_discussion.object_type = 'P' AND cscart_discussion.company_id = 1 LEFT JOIN cscart_discussion_posts ON cscart_discussion_posts.thread_id = cscart_discussion.thread_id AND cscart_discussion_posts.status = 'A' LEFT JOIN cscart_discussion_rating ON cscart_discussion.thread_id = cscart_discussion_rating.thread_id AND cscart_discussion_rating.post_id = cscart_discussion_posts.post_id AND cscart_discussion_rating.rating_value != 0 WHERE 1 AND categories_filter.category_id IN (182) AND cscart_categories.company_id = 1 AND categories_filter.company_id = 1 AND (products.usergroup_ids = '' OR FIND_IN_SET(0, products.usergroup_ids) OR FIND_IN_SET(1, products.usergroup_ids)) AND products.status IN ('A') AND prices.usergroup_id IN (0, 0, 1) GROUP BY products.product_id ORDER BY product asc LIMIT 0, -1
Backtrace››

index.php (fn_dispatch): 25
app/functions/fn.control.php (fn_run_controller): 370
app/functions/fn.control.php (include): 587
app/controllers/frontend/categories.php (fn_get_products): 94
app/functions/fn.catalog.php (db_get_array): 7454
app/functions/fn.database.php (call_user_func_array): 29
app/Tygh/Database.php (getArray): 111
app/Tygh/Database.php (query): 333

Any help or idea how to fix it ?

 

thak you

 

Carlos

 


 
  • galtinbaeva
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 06-Dec 13
  • 3476 posts

Posted 27 November 2015 - 11:42 AM #2

How comes that LIMIT 0, -1? It is not a valid limitation


Simtech Development | sales@simtechdev.com | www.simtechdev.com
CERTIFIED CS-CART PARTNER | LICENSES | DEVELOPMENT | ADD-ONS | DESIGN | UPGRADE

Google Analytics Enhanced Ecommerce - get advanced ecommerce analytics


 
  • galtinbaeva
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 06-Dec 13
  • 3476 posts

Posted 27 November 2015 - 11:44 AM #3

It seems it can happen if you pass '&limit=-1' request parameter directly


Simtech Development | sales@simtechdev.com | www.simtechdev.com
CERTIFIED CS-CART PARTNER | LICENSES | DEVELOPMENT | ADD-ONS | DESIGN | UPGRADE

Google Analytics Enhanced Ecommerce - get advanced ecommerce analytics


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 20934 posts

Posted 27 November 2015 - 01:11 PM #4

simtechdev is right. Try to disable 3rd party addons at first.


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 

Posted 25 February 2016 - 12:58 AM #5

Hi guys

 

I'm having a similar problem, i keep getting this error. I've tried everything but i just can't pin point the issue. Dose any one have any idea?

Database (error)Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'asc LIMIT 0, 96' at line 1 <b>(1064)</b>
Query: SELECT SQL_CALC_FOUND_ROWS products.product_id, IF(shared_descr.product_id IS NOT NULL, shared_descr.product, descr1.product) as product, cscart_supplier_links.supplier_id FROM cscart_products as products LEFT JOIN cscart_product_descriptions as descr1 ON descr1.product_id = products.product_id AND descr1.lang_code = 'en' LEFT JOIN cscart_product_prices as prices ON prices.product_id = products.product_id AND prices.lower_limit = 1 INNER JOIN cscart_products_categories as products_categories ON products_categories.product_id = products.product_id INNER JOIN cscart_categories ON cscart_categories.category_id = products_categories.category_id AND (cscart_categories.usergroup_ids = '' OR FIND_IN_SET(0, cscart_categories.usergroup_ids) OR FIND_IN_SET(1, cscart_categories.usergroup_ids)) AND cscart_categories.status IN ('A', 'H') LEFT JOIN cscart_ult_product_descriptions shared_descr ON shared_descr.product_id = products.product_id AND shared_descr.company_id = 1 AND shared_descr.lang_code = 'en' LEFT JOIN cscart_supplier_links ON cscart_supplier_links.object_id = products.product_id AND cscart_supplier_links.object_type = 'P' WHERE 1 AND (((descr1.search_words LIKE '%la%') OR descr1.product LIKE '%la%' OR (descr1.meta_keywords LIKE '%la%' OR descr1.meta_description LIKE '%la%')) AND ((descr1.search_words LIKE '%villa%') OR descr1.product LIKE '%villa%' OR (descr1.meta_keywords LIKE '%villa%' OR descr1.meta_description LIKE '%villa%'))) AND cscart_categories.company_id = 1 AND (products.usergroup_ids = '' OR FIND_IN_SET(0, products.usergroup_ids) OR FIND_IN_SET(1, products.usergroup_ids)) AND products.status IN ('A') AND prices.usergroup_id IN (0, 0, 1) AND cscart_categories.status != 'D' GROUP BY products.product_id ORDER BY asc LIMIT 0, 96
Backtrace››index.php (fn_dispatch): 25
app/functions/fn.control.php (fn_run_controller): 456
app/functions/fn.control.php (include): 685
app/controllers/frontend/products.php (fn_get_products): 33
app/functions/fn.catalog.php ({closure}): 6707
app/functions/fn.catalog.php (db_get_array): 6627
app/functions/fn.database.php (call_user_func_array): 29
app/Tygh/Database.php (getArray): 141
app/Tygh/Database.php (query): 359


 
  • CS-Cart team
  • CS-Cart support team
  • Moderators
  • Join Date: 04-Apr 11
  • 3810 posts

Posted 25 February 2016 - 06:14 AM #6

 

Hi guys

 

I'm having a similar problem, i keep getting this error. I've tried everything but i just can't pin point the issue. Dose any one have any idea?

Database (error)Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'asc LIMIT 0, 96' at line 1 <b>(1064)</b>
Query: SELECT SQL_CALC_FOUND_ROWS products.product_id, IF(shared_descr.product_id IS NOT NULL, shared_descr.product, descr1.product) as product, cscart_supplier_links.supplier_id FROM cscart_products as products LEFT JOIN cscart_product_descriptions as descr1 ON descr1.product_id = products.product_id AND descr1.lang_code = 'en' LEFT JOIN cscart_product_prices as prices ON prices.product_id = products.product_id AND prices.lower_limit = 1 INNER JOIN cscart_products_categories as products_categories ON products_categories.product_id = products.product_id INNER JOIN cscart_categories ON cscart_categories.category_id = products_categories.category_id AND (cscart_categories.usergroup_ids = '' OR FIND_IN_SET(0, cscart_categories.usergroup_ids) OR FIND_IN_SET(1, cscart_categories.usergroup_ids)) AND cscart_categories.status IN ('A', 'H') LEFT JOIN cscart_ult_product_descriptions shared_descr ON shared_descr.product_id = products.product_id AND shared_descr.company_id = 1 AND shared_descr.lang_code = 'en' LEFT JOIN cscart_supplier_links ON cscart_supplier_links.object_id = products.product_id AND cscart_supplier_links.object_type = 'P' WHERE 1 AND (((descr1.search_words LIKE '%la%') OR descr1.product LIKE '%la%' OR (descr1.meta_keywords LIKE '%la%' OR descr1.meta_description LIKE '%la%')) AND ((descr1.search_words LIKE '%villa%') OR descr1.product LIKE '%villa%' OR (descr1.meta_keywords LIKE '%villa%' OR descr1.meta_description LIKE '%villa%'))) AND cscart_categories.company_id = 1 AND (products.usergroup_ids = '' OR FIND_IN_SET(0, products.usergroup_ids) OR FIND_IN_SET(1, products.usergroup_ids)) AND products.status IN ('A') AND prices.usergroup_id IN (0, 0, 1) AND cscart_categories.status != 'D' GROUP BY products.product_id ORDER BY asc LIMIT 0, 96
Backtrace››index.php (fn_dispatch): 25
app/functions/fn.control.php (fn_run_controller): 456
app/functions/fn.control.php (include): 685
app/controllers/frontend/products.php (fn_get_products): 33
app/functions/fn.catalog.php ({closure}): 6707
app/functions/fn.catalog.php (db_get_array): 6627
app/functions/fn.database.php (call_user_func_array): 29
app/Tygh/Database.php (getArray): 141
app/Tygh/Database.php (query): 359

 

Do you have the Searchanise add-on enabled?


Sincerely yours, CS-Cart Support Team

 

User guide       |  Developer documentation  |  Core API documentation


 

Posted 25 February 2016 - 12:54 PM #7

Do you have the Searchanise add-on enabled?

 

Yeah i do.



 
  • CS-Cart team
  • CS-Cart support team
  • Moderators
  • Join Date: 04-Apr 11
  • 3810 posts

Posted 25 February 2016 - 12:58 PM #8

Yeah i do.

 

Try to temporary disable it and check whether the issue is reproduced.


Sincerely yours, CS-Cart Support Team

 

User guide       |  Developer documentation  |  Core API documentation


 

Posted 25 February 2016 - 10:11 PM #9

Try to temporary disable it and check whether the issue is reproduced.

 

Hi

 

Thanks, the errors stopped when i switched it off. To be honest, i've always had problems with Searchanise add-on, I'll just keep it off. 

 

You don't happen to know of any good quick search addons?

 

Thanks again.



 
  • CS-Cart team
  • CS-Cart support team
  • Moderators
  • Join Date: 04-Apr 11
  • 3810 posts

Posted 26 February 2016 - 06:09 AM #10

Hi

 

Thanks, the errors stopped when i switched it off. To be honest, i've always had problems with Searchanise add-on, I'll just keep it off. 

 

You don't happen to know of any good quick search addons?

 

Thanks again.

 

We recommend you to contact Searchanise support team.


Sincerely yours, CS-Cart Support Team

 

User guide       |  Developer documentation  |  Core API documentation