织梦数据库函数调用

 {dede:php}
 $thisid = $refObj->Fields['id'];
 $row = $dsql->GetOne("Select typeid From `nesky_archives` where id='$thisid' order by sortrank  desc  ");
 $thisid=$row['typeid'];
  if ($thisid==22 or $thisid==16 or $thisid==37 or $thisid==38 or $thisid==39 or $thisid==42 or $thisid==45  )
  {  
   $sql="select * from nesky_archives where typeid='$thisid'";
   $dsql->SetQuery($sql);
   $dsql->Execute();
   $i=8;
   while($reture_values=$dsql->GetArray() and $i>=0)
   {
      echo "<li><a href='http://www.jiningyiyuan.com/wap/view.php?aid=".$reture_values[id]."'>".substr($reture_values[title],0,44)."</a>";
      $i=$i-1;
   }
  }
 {/dede:php}     
          

原文地址:https://www.cnblogs.com/subtract/p/3380234.html