作者:小玲的夏天_905_735_602 | 来源:互联网 | 2017-05-13 02:17
php 查找子分类下所有父集分类
functionget_parent_id($cid){global$db;
$pids = '';
$parent_id = $db -> getOne("select parent_id from eload_category where cat_id = '".$cid."'");
if( $parent_id != '' ){
$pids .= $parent_id;
$npids = get_parent_id( $parent_id );
if(isset($npids))
$pids .= ','.$npids;
}
return$pids;
}
').addClass('pre-numbering').hide();
$(this).addClass('has-numbering').parent().append($numbering);
for (i = 1; i <= lines; i++) {
$numbering.append($('
').text(i));
};
$numbering.fadeIn(1700);
});
});
以上就介绍了php 通过递归 查找父集分类,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。