Database error: 1109 : Unknown table 'sales' in order clause
Invalid query: SELECT products.product_id, descr1.product as product, products.tracking, products.feature_comparison, products.zero_price_action, products.product_type, products.product_code, products.amount, prices.price, products.avail, products.list_price, descr1.short_description, products.is_edp, avail_products.position FROM avail_products INNER JOIN cscart_products as products ON products.product_id=avail_products.product_id AND products.avail='Y' LEFT JOIN cscart_products_categories as cats ON products.product_id=cats.product_id LEFT JOIN cscart_product_descriptions as descr1 ON descr1.product_id=products.product_id AND descr1.lang_code='EN' LEFT JOIN prices ON prices.product_id=avail_products.product_id WHERE 1 AND (products.manufacturer_id!=26 OR products.manufacturer_id!=18) GROUP BY avail_products.product_id ORDER BY sales.amount desc LIMIT 0, 24
Backtrace:
| File: | /var/www/vhosts/watchshopuk.com/httpdocs/index.php |
| Line: | 276 |
| Function: | include |
| File: | /var/www/vhosts/watchshopuk.com/httpdocs/targets/categories.php |
| Line: | 36 |
| Function: | include |
| File: | /var/www/vhosts/watchshopuk.com/httpdocs/include/customer/categories.php |
| Line: | 79 |
| Function: | include |
| File: | /var/www/vhosts/watchshopuk.com/httpdocs/include/common/search_products.php |
| Line: | 728 |
| Function: | include |
| File: | /var/www/vhosts/watchshopuk.com/httpdocs/include/common/search_products_improved.php |
| Line: | 94 |
| Function: | db_get_array |
| File: | /var/www/vhosts/watchshopuk.com/httpdocs/core/fn_database.php |
| Line: | 42 |
| Function: | db_query |
| File: | /var/www/vhosts/watchshopuk.com/httpdocs/core/db_mysql.php |
| Line: | 89 |
| Function: | db_debug_error |