function ListChildTree($SearchPattern,$BaseNum){
global $Tree;//声明连接数据库的句柄为全局
$Sql="select DepartmentId,DepartmentName from test where DepartmentId like '$SearchPattern'"; //查找孩子节点
$QueryChild=$Tree->query($Sql);
while($Result=$Tree->fetch_array($QueryChild)) { //取出孩子节点
$Space="";
for($j=0;$j
$Space.=" "; //设置显示节点前面的距离,这里的空格的html被这里自动替换成" "了
$ChildDepartment=trim($Result[0])."___";
$ChildSql="select count(*) from test where DepartmentId like '$ChildDepartment'";//查找孩子节点的孩子节点
$ChildResult=$Tree->query_first($ChildSql);
$TableId="ta".trim($Result[0]); //设置表格Id
$TablePic="ta".trim($Result[0])."pic"; //设置图片Id
if($ChildResult[0]
?>
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn