An exception occurred in shop's script

  • Error type: MySQL Error
  • Source, line: Parser::kasdim_goods_topic[219]
  • Error message: Unknown column '5060∨der_key' in 'where clause'
 SELECT s.id,        
                       IF(list.status_key = 'kExist', 1, 10) AS status_pos,
                       IF(si_n.id IS NULL, 0, 1) AS news,
                       (list.out_price_sum - list.pprice_sum)/81.00*3 + 
                       IFNULL(resp.how, 0)*0.5 +
                       IFNULL(prov_plus.how, 0)*0.5 +                                              
                       IFNULL(prov_minus.how, 0)*-1.5 +
                       s.rating*1.5 + 
                       IF(LENGTH(s.review) > 100, 1, 0)*0.3 + 
                       IF(p.skey = 'STOCK', 1, 0)*2 +
                       IF(si_n.id IS NULL, 0, 1)*0.7 +
                       IF(sp_dump.value_set_sum > 0, 1, 0)*2 +                                 
                       s.award_cnt*0.05 AS auto_order                          
                  FROM ( SELECT IF(s.clann = 0, s.id, 
                                ( SELECT sc.id 
                                    FROM MS_store sc 
                                   WHERE s.clann = sc.clann 
                                     AND sc.clann_root = 1
                                ) ) AS ids, 
                                IF(SUM(IF(s.status_key = 'kExist', 1, 0)) > 0, 'kExist', 'kAbsent') AS status_key,
                                SUM(IFNULL(kss.out_price_sum, 0)) AS out_price_sum,
                                SUM(IFNULL(kss.pprice_sum, 0)) AS pprice_sum                          
                           FROM MS_kasdim_topic_sub t_sub
                           JOIN MS_topic_store t_s
                             ON t_sub.sub_id = t_s.topic_id
                           JOIN MS_store s
                             ON t_s.store_id = s.id      
                                JOIN MS_store_info s_i_697 ON s_i_697.store_id = s.id               
                       LEFT JOIN MS_kasdim_store_sales kss
                              ON kss.store_id = s.id                                     
                          WHERE t_sub.parent_id = '2949'
                            AND s.no_visible = 0                          
                            AND s.state_key = 'kOk'
                                
                                 AND ( s_i_697.value_id = 5060∨der_key=price )                                                          
                       GROUP BY ids                                                       
                       ) AS list    
                  JOIN MS_store s
                    ON s.id = list.ids     
             LEFT JOIN MS_provider p
                    ON p.id = s.provider_id                                                               
             LEFT JOIN MS_store_info si_n
                    ON si_n.store_id = s.id
                   AND si_n.value_id = '4665'                                                       
             LEFT JOIN MS_store_param sp_dump
                    ON sp_dump.store_id = s.id    
                   AND sp_dump.param_id = '6'   
             LEFT JOIN ( SELECT store_id, COUNT(*) AS how 
                           FROM MS_store_param 
                          WHERE param_id = '11'
                       GROUP BY store_id
                       ) AS resp
                    ON resp.store_id = s.relate_id
             LEFT JOIN ( SELECT pv.provider_id, COUNT(pv.id) AS how
                           FROM MS_provider_key_set pv
                           JOIN MS_provider_key pk
                             ON pv.key_id = pk.id   
                           JOIN MS_provider_key_value pkv
                             ON pv.value_id = pkv.id 
                          WHERE ( pk.skey = 'STORE' AND pkv.skey = 'LOCAL' )
                             OR ( pk.skey = 'RETURN' AND pkv.skey = 'FULL' )
                       GROUP BY pv.provider_id                               
                       ) AS prov_plus 
                    ON prov_plus.provider_id = p.id                      
             LEFT JOIN ( SELECT pv.provider_id, COUNT(pv.id) AS how
                           FROM MS_provider_key_set pv
                           JOIN MS_provider_key pk
                             ON pv.key_id = pk.id   
                           JOIN MS_provider_key_value pkv
                             ON pv.value_id = pkv.id 
                          WHERE ( pk.skey = 'PAY_ORDER' AND pkv.skey = 'NO' )
                             OR ( pk.skey = 'PAY_CASH' AND pkv.skey = 'NO' )
                             OR ( pk.skey = 'SAFE_PRICE' AND pkv.skey = 'NO' )
                             OR ( pk.skey = 'SERVICE' AND pkv.skey = 'NONE' )
                             OR ( pk.skey = 'RETURN' AND pkv.skey = 'NONE' )
                       GROUP BY pv.provider_id                            
                       ) AS prov_minus 
                    ON prov_minus.provider_id = p.id                                                 
                                                         
              ORDER BY status_pos, auto_order DESC, s.id