madvolkov 0 Posted May 8, 2020 Report Share Posted May 8, 2020 Выдает ошибку в бд если отключить вывод товаров подкатегорий в родительской категории в настройках - вывод товара 1054 - Unknown column 'c.sort_order' in 'order clause' select p.products_fsk18, p.products_shippingtime, p.products_model, p.products_ean, DATEDIFF(CURDATE() , p.products_date_added)as products_date_added, pd.products_name, m.manufacturers_name, p.products_quantity, p.products_image, p.products_weight, pd.products_short_description, pd.products_description, p.products_id, p.manufacturers_id, p.products_price, p.products_vpe, p.products_vpe_status, p.products_vpe_value, p.products_discount_allowed, p.products_tax_class_id from products_description pd, products_to_categories p2c, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '1' ORDER BY c.sort_order, p.products_sort, p.products_price ASC Link to post Share on other sites
support 447 Posted May 8, 2020 Report Share Posted May 8, 2020 33 минуты назад, madvolkov сказал: 1054 - Unknown column 'c.sort_order' in 'order clause' Пишет, что в таблице categories нет колонки sort_order Хотя странный запрос, в самом запросе даже нет таблицы categories. А Вы код не правили, не добавляли ничего в коде?! Надо в /includes/modules/default.php или product_listing.php Поиска по c.sort_order и удалить. Link to post Share on other sites
madvolkov 0 Posted May 8, 2020 Author Report Share Posted May 8, 2020 Удалил c.sort_order в файле /includes/modules/default.php не помогло. Вот полный файл ошибки. Subject: MySQL DB Error! X-PHP-Originating-Script: 0:vam_db_error.inc.php From: db_error@minute MYSQL ERROR REPORT - 08/05/2020 14:05:04 --------------------------------------- 1054 - Unknown column 'c.sort_order' in 'order clause' select p.products_fsk18, p.products_shippingtime, p.products_model, p.products_ean, DATEDIFF(CURDATE() , p.products_date_added)as products_date_added, pd.products_name, m.manufacturers_name, p.products_quantity, p.products_image, p.products_weight, pd.products_short_description, pd.products_description, p.products_id, p.manufacturers_id, p.products_price, p.products_vpe, p.products_vpe_status, p.products_vpe_value, p.products_discount_allowed, p.products_tax_class_id from products_description pd, products_to_categories p2c, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '1' ORDER BY c.sort_order, p.products_sort, p.products_price ASC --------------------------------------- Server Name : minute Remote Address: 127.0.0.1 Referer : http://minute/mjacnye.html Requested : /canape.html Trace Back : manager.php:53(includearray(1) {; [0]=>; string(35) "index.php"; }; ) => index.php:57(includearray(1) {; [0]=>; string(54) "includes/modules/default.php"; }; ) => includes/modules/default.php:462(includearray(1) {; [0]=>; string(62) "includes/modules/product_listing.php"; }; ) => includes/modules/product_listing.php:35(splitPageResults->splitPageResultsarray(4) {; [0]=>; &string(1938) "select p.products_fsk18,; p.products_shippingtime,; p.products_model,; p.products_ean,; DATEDIFF(CURDATE() , p.products_date_added)as products_date_added,; pd.products_name,; m.manufacturers_name,; p.products_quantity,; p.products_image,; p.products_weight,; pd.products_short_description,; pd.products_description,; p.products_id,; p.manufacturers_id,; p.products_price,; p.products_vpe,; p.products_vpe_status,; p.products_vpe_value, ; p.products_discount_allowed,; p.products_tax_class_id; from products_description pd,; products_to_categories p2c,; products p; left join manufacturers m on p.manufacturers_id = m.manufacturers_id; left join specials s on p.products_id = s.products_id; where p.products_status = '1'; and p.products_id = p2c.products_id; and pd.products_id = p2c.products_id; ; ; and pd.language_id = '1' and p2c.categories_id = '1' ORDER BY c.sort_order, p.products_sort, p.products_price ASC "; [1]=>; &int(0); [2]=>; &string(2) "35"; [3]=>; &string(13) "p.products_id"; }; ) => includes/classes/split_page_results.php:52(vamDBqueryarray(1) {; [0]=>; &string(1938) "select p.products_fsk18,; p.products_shippingtime,; p.products_model,; p.products_ean,; DATEDIFF(CURDATE() , p.products_date_added)as products_date_added,; pd.products_name,; m.manufacturers_name,; p.products_quantity,; p.products_image,; p.products_weight,; pd.products_short_description,; pd.products_description,; p.products_id,; p.manufacturers_id,; p.products_price,; p.products_vpe,; p.products_vpe_status,; p.products_vpe_value, ; p.products_discount_allowed,; p.products_tax_class_id; from products_description pd,; products_to_categories p2c,; products p; left join manufacturers m on p.manufacturers_id = m.manufacturers_id; left join specials s on p.products_id = s.products_id; where p.products_status = '1'; and p.products_id = p2c.products_id; and pd.products_id = p2c.products_id; ; ; and pd.language_id = '1' and p2c.categories_id = '1' ORDER BY c.sort_order, p.products_sort, p.products_price ASC "; }; ) => includes/application_top.php:201(vam_db_queryCachedarray(1) {; [0]=>; &string(1938) "select p.products_fsk18,; p.products_shippingtime,; p.products_model,; p.products_ean,; DATEDIFF(CURDATE() , p.products_date_added)as products_date_added,; pd.products_name,; m.manufacturers_name,; p.products_quantity,; p.products_image,; p.products_weight,; pd.products_short_description,; pd.products_description,; p.products_id,; p.manufacturers_id,; p.products_price,; p.products_vpe,; p.products_vpe_status,; p.products_vpe_value, ; p.products_discount_allowed,; p.products_tax_class_id; from products_description pd,; products_to_categories p2c,; products p; left join manufacturers m on p.manufacturers_id = m.manufacturers_id; left join specials s on p.products_id = s.products_id; where p.products_status = '1'; and p.products_id = p2c.products_id; and pd.products_id = p2c.products_id; ; ; and pd.language_id = '1' and p2c.categories_id = '1' ORDER BY c.sort_order, p.products_sort, p.products_price ASC "; }; ) => inc/vam_db_queryCached.inc.php:47(vam_db_errorarray(3) {; [0]=>; &string(1938) "select p.products_fsk18,; p.products_shippingtime,; p.products_model,; p.products_ean,; DATEDIFF(CURDATE() , p.products_date_added)as products_date_added,; pd.products_name,; m.manufacturers_name,; p.products_quantity,; p.products_image,; p.products_weight,; pd.products_short_description,; pd.products_description,; p.products_id,; p.manufacturers_id,; p.products_price,; p.products_vpe,; p.products_vpe_status,; p.products_vpe_value, ; p.products_discount_allowed,; p.products_tax_class_id; from products_description pd,; products_to_categories p2c,; products p; left join manufacturers m on p.manufacturers_id = m.manufacturers_id; left join specials s on p.products_id = s.products_id; where p.products_status = '1'; and p.products_id = p2c.products_id; and pd.products_id = p2c.products_id; ; ; and pd.language_id = '1' and p2c.categories_id = '1' ORDER BY c.sort_order, p.products_sort, p.products_price ASC "; [1]=>; &int(1054); [2]=>; &string(47) "Unknown column 'c.sort_order' in 'order clause'"; }; ) Прошу прощения, это был кеш. Все нормально теперь. Спасибо Link to post Share on other sites
support 447 Posted May 8, 2020 Report Share Posted May 8, 2020 56 минут назад, madvolkov сказал: Прошу прощения, это был кеш. Все нормально теперь. Спасибо Не за что. Хорошо, что разобрались. Link to post Share on other sites
Recommended Posts