et分类的设计

| |
[不指定 2008/06/28 11:49 | by Else ]
找了一下资料 ,可以用这个方法来玩成et的
  function et_cat($sql)
  {
    global $db;
    $query=$db->query($sql);
    while($qs = $db->fetch_array($query))
    {
      $str='|-';
      if(substr_count($qs['path'],',')>1)
      {
      for($i=0;$i<(substr_count($qs['path'],',')-2);$i++)
      $str.= '---';
       }
       $qs['catname']=$str.$qs['catname'];
       $arr[]=$qs;    
    }    
    return $arr;
   }


$pclist = $ck->et_cat("select * from cuku_procat order by path");

作者:Else 's Blog
地址:http://www.aixq.com/post/1090/
版权所有。转载时必须链接形式注明作者和原始出处及本声明!
  • 中查看更多“et分类的设计”相关内容
  • 中查看更多“et分类的设计”相关内容
  • 中查看更多“et分类的设计”相关内容
  • 中查看更多“et分类的设计”相关内容
  • 中查看更多“et分类的设计”相关内容
  • 中查看更多“et分类的设计”相关内容
  • Tags:
    自己 感悟 信念 | 评论(0) | 引用(0) | 阅读(1830)
    发表评论
    表情
    emotemotemotemotemot
    emotemotemotemotemot
    emotemotemotemotemot
    emotemotemotemotemot
    emotemotemotemotemot
    打开HTML
    打开UBB
    打开表情
    隐藏
    昵称   密码   游客无需密码
    网址   电邮   [注册]