typecho获取分类下文章数量

typecho获取分类下文章数量

  1. function leinum($id){
  2. $db = Typecho_Db::get();
  3. $po=$db->select('table.metas.mid')->from ('table.metas')->where ('parent = ?', $id);
  4. $pom = $db->fetchAll($po);
  5. $num = count($pom);
  6. $shu = $id;
  7. if($num>0){
  8. for ($x=0; $x<$num; $x++) {
  9. $shu=$pom[$x]['mid'].','.$shu;
  10. }}
  11. echo $shu;
  12. }
文章由官网发布,如若转载,请注明出处:https://www.veimoz.com/83
0 评论
4.2k

发表评论

!