博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

织梦数据库函数调用

Posted on 2013-10-21 11:20  SmarTom  阅读(293)  评论(0)    收藏  举报

 {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}