zoukankan      html  css  js  c++  java
  • advancedsearch.php织梦高级自定义模型字段无法调用解决方案

    advancedsearch.php织梦dedecms 高级自定义模型字段无法调用解决方案 ,具体步骤如下:

    1  打开修改puls/advancedsearch.php文件,找到复制代码(不同版本可能有所差别)。
     
     
    $query = "SELECT addon.*, arctype.* FROM $addontable addon   
            LEFT JOIN arctype ON arctype.id = addon.typeid  
            $where $orderby";   
        } else {   
            $query = "SELECT main.id AS aid,main.*,main.description AS description1, type.* 
        FROM $maintable main   
        LEFT JOIN type ON type.id = main.typeid   
        LEFT JOIN $addontable addon ON addon.aid = main.id   
        $where  $orderby";  
     
     
    如果是5.7以前的版本
    $query = "SELECT addon.*, arctype.* FROM $addontable addon  
    这一段是没有 addon 的!
    复制这段加上即可!
     
    2 然后 再改这段
     
    else {   
           $query = "SELECT main.id AS aid,main.*,main.description AS description1, type.* 
       FROM $maintable main   
       LEFT JOIN type ON type.id = main.typeid   
       LEFT JOIN $addontable addon ON addon.aid = main.id   
       $where  $orderby";  
     
    5.7所有的版本 都要改这段 改成:
    else {   
      $query = "select addon.*,main.id as aid,main.*,main.description as description1, type.*
    from $maintable main  
    left join dede_arctype type on type.id=main.typeid  
    left join $addontable addon on addon.aid=main.id  
    $where  $orderby";  
    就是
           $query = "SELECT main.id AS aid,main.*,main.description AS description1, type.* 
     
    这段改成
      $query = "select addon.*,main.id as aid,main.*,main.description as description1, type.*
    这样即可! 
    所以所有版本改后的代码为:
    $query = "select addon.*, arctype.* from $addontable addon  
      left join dede_arctype arctype on arctype.id=addon.typeid  
      $where $orderby";   
    } else {   
      $query = "select addon.*,main.id as aid,main.*,main.description as description1, type.*
    from $maintable main  
    left join dede_arctype type on type.id=main.typeid  
    left join $addontable addon on addon.aid=main.id  
    $where  $orderby";  
  • 相关阅读:
    LOJ6274 数字
    test20200415 看门人 和 WC2010 重建计划
    TJOI2018 Party 和 HDU4352 XHXJ's LIS
    LOJ3228 Tree Depth
    AGC026D Histogram Coloring
    LOJ3277 星座 和 BZOJ2616 PERIODNI
    LOJ2331 某位歌姬的故事 和 CF1327F AND Segments
    AGC024F Simple Subsequence Problem
    LOJ3278 收获
    LOJ3282 治疗计划
  • 原文地址:https://www.cnblogs.com/snowhite/p/6885097.html
Copyright © 2011-2022 走看看