织梦dedecms自定义标签liketags调用tag/keyword相同的相关文章(4)

                         $keyword .= ($keyword=='' ? " CONCAT(arc.keywords,' ',arc.title) like '%$k%' " : " OR CONCAT(arc.keywords,' ',arc.title) like '%$k%' ");

                         $n++;

                     }

                 } 

                 $arcid = (!empty($refObj->Fields['id']) ? $refObj->Fields['aid'] : 0); 

                 if( empty($arcid) || $byabs==0 )

                 {

                     $orderquery = " order by arc.id desc ";

                 }

                 else

                 { 

                     $orderquery = " order by ABS(arc.id - ".$arcid.") ";

                 } 

                 if($keyword != '') 

                 {

                     if(!empty($typeid))

                     {

                         $typeid = " And arc.typeid in($typeid) And arc.id<>$arcid ";

                     }

                     $query = "Select arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule, 

                     tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath 

                     from `dede_archives` arc left join `dede_arctype` tp on arc.typeid=tp.id 

                     where arc.arcrank>-1 and ($keyword)  $typeid $orderquery limit 0, $row";

                 } 

                 else 

                 {

                     if(!empty($typeid))

                     { 

                         $typeid = " arc.typeid in($typeid) And arc.id<>$arcid "; 

                     } 

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/6c6fba2fe861ebb8814605b843aea190.html