function get_category($category_id) {
$mysql = new Mysql();
$category_ids = $category_id . “,”;
$child_category =
m
y
s
q
l
−
>
f
e
t
c
h
R
o
w
s
(
"
s
e
l
e
c
t
∗
f
r
o
m
d
d
c
a
t
e
g
a
r
y
w
h
e
r
e
f
i
d
=
′
mysql->fetchRows("select * from dd_categary where fid = '
mysql−>fetchRows("select∗fromddcategarywherefid=′category_id’");
foreach ($child_category as $key => $val) {
c
a
t
e
g
o
r
y
i
d
s
.
=
g
e
t
c
a
t
e
g
o
r
y
(
category_ids .= get_category(
categoryids.=getcategory(val[“id”]);
}
unset($mysql);
return $category_ids;
}
通过递归查找所有子级栏目id
最新推荐文章于 2022-05-26 10:54:03 发布