Ошибка SQL: Unknown column 'product_lnk_factory' in 'on clause'
SQL: [SELECT # Для авторизации auth_user.user_uid_id AS auth_user_uid_id, auth_user.user_chr_name AS auth_user_chr_name, auth_user.user_chr_email AS auth_user_chr_email, auth_user.user_chr_phone AS auth_user_chr_phone, auth_user.user_chr_pass AS auth_user_chr_pass, # Корректные ID пользователя IF( NULLIF(NULL, '') IS NOT NULL, NULL, CONCAT(IFNULL(auth_user.user_uid_id, 0), ',', IFNULL(65841835, 0), ',', NULL) ) AS auth_users, # Тип пользователя IF(auth_user.user_hld_holder = 15136, 'admin', 'user') AS auth_user_type, # Авторизован пользователь или нет, используется для кеша IF(auth_user.user_uid_id IS NULL, 'no', 'yes') AS auth_user_logged, # Глобальный фильтр NULLIF(NULL, '') AS gteproduct_dec_current, NULLIF(NULL, '') AS lteproduct_dec_current, NULLIF(NULL, '') AS gteproduct_int_balance, # Для sphinx IFNULL( REPLACE( IF( NULL = 'on', IFNULL(NULL, ''), NULL ), '"', ' ' ), '' ) AS product_sph_string, # Для sphinx # Получаем ID категории в которой находимся ( SELECT a.folder_uid_id FROM account_folder a WHERE a.folder_cnt_account=150 AND a.folder_hld_holder IN(14821) AND a.folder_mbr_member = 0 AND a.folder_chr_link IN('posuda','predmety-servirovki') AND 'catalog' IN('catalog','_catalog') ORDER BY folder_uid_id DESC LIMIT 1 ) AS current_folder_id, # Для sphinx # Получаем ID категории наивысшего родителя папки, в которой находимся ( SELECT a.folder_uid_id FROM account_folder a WHERE a.folder_cnt_account=150 AND a.folder_hld_holder IN(14821) AND a.folder_mbr_member = 0 AND a.folder_chr_link IN('posuda','predmety-servirovki') AND 'catalog' IN('catalog','_catalog') ORDER BY folder_uid_id ASC LIMIT 1 ) AS parent_folder_id FROM (SELECT 1) AS dummy LEFT JOIN account_user AS auth_user ON auth_user.user_cnt_account = 150 AND auth_user.user_hld_holder IN (15043, 15136) AND auth_user.user_uid_id = COALESCE(NULLIF(NULL, ''), NULL) AND (product_lnk_factory = 401228) /* module_id:331953 */]