Loading...

Database error: Expression #48 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'jbhodges.products_categories.position' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (1055)
Invalid query: SELECT SQL_CALC_FOUND_ROWS products.*, descr1.product as product, MIN(prices.price) as price, companies.company as company_name, GROUP_CONCAT(IF(products_categories.link_type = 'M', CONCAT(products_categories.category_id, 'M'), products_categories.category_id)) as category_ids, products_categories.position, SUM(cscart_product_sales.amount) as sales_amount, IF(products.age_verification = 'Y', 'Y', IF(cscart_categories.age_verification = 'Y', 'Y', cscart_categories.parent_age_verification)) as age_verification, IF(products.age_limit > cscart_categories.age_limit, IF(products.age_limit > cscart_categories.parent_age_limit, products.age_limit, cscart_categories.parent_age_limit), IF(cscart_categories.age_limit > cscart_categories.parent_age_limit, cscart_categories.age_limit, cscart_categories.parent_age_limit)) as age_limit 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 LEFT JOIN cscart_companies AS companies ON companies.company_id = products.company_id 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_product_sales ON cscart_product_sales.product_id = products.product_id AND cscart_product_sales.category_id = products_categories.category_id WHERE 1 AND (FIND_IN_SET(2 , products.localization)) AND (FIND_IN_SET(2 , cscart_categories.localization)) AND (companies.status = 'A' OR products.company_id = 0) 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_product_sales.amount >= 1 GROUP BY cscart_product_sales.product_id ORDER BY sales_amount desc LIMIT 0, 3


Backtrace:

File:/home/jbhodges/public_html/asstore/core/fn.database.php
Line:259
Function:db_error
File:/home/jbhodges/public_html/asstore/core/fn.database.php
Line:29
Function:db_query
File:/home/jbhodges/public_html/asstore/core/fn.catalog.php
Line:3732
Function:db_get_array
File:/home/jbhodges/public_html/asstore/core/fn.cms.php
Line:754
Function:fn_get_products
File:/home/jbhodges/public_html/asstore/core/templater_plugins/function.block.php
Line:269
Function:fn_get_block_items
File:/home/jbhodges/public_html/asstore/core/templater_plugins/function.block.php
Line:65
Function:smarty_function_block_output
File:/home/jbhodges/public_html/asstore/core/templater_plugins/function.block.php
Line:33
Function:smarty_function_group_output
File:/home/jbhodges/public_html/asstore/var/compiled/customer/%%72^72D^72DAF6E8%%main.tpl.php
Line:11
Function:smarty_function_block
File:/home/jbhodges/public_html/asstore/core/class.templater.php
Line:105
Function:include
File:/home/jbhodges/public_html/asstore/var/compiled/customer/%%45^45E^45E480CD%%index.tpl.php
Line:375
Function:_smarty_include
File:/home/jbhodges/public_html/asstore/lib/templater/Smarty.class.php
Line:1265
Function:include
File:/home/jbhodges/public_html/asstore/lib/templater/Smarty.class.php
Line:1108
Function:fetch
File:/home/jbhodges/public_html/asstore/core/class.templater.php
Line:141
Function:display
File:/home/jbhodges/public_html/asstore/core/fn.control.php
Line:518
Function:display
File:/home/jbhodges/public_html/asstore/index.php
Line:28
Function:fn_dispatch