大家是不是这样取商品分类_PHP教程
时间:2021-07-01 10:21:17
帮助过:2人阅读
PHP代码:--------------------------------------------------------------------------------
// 取商品分类
//**************************************************************************
$result=$db->query("SELECT * FROM categories WHERE categories_parent_id=0 ORDER BY categories_sort_order");
while($row=$db->fetch_array($result))
{
$categories.=$row[categories_name]."
";
$result2=$db->query("SELECT * FROM categories WHERE categories_parent_id=$row[categories_id] ORDER BY categories_sort_order");
while($row2=$db->fetch_array($result2))
{
$categories.=$row2[categories_name]."/";
}
$categories.="
";
}
//**************************************************************************
http://www.bkjia.com/PHPjc/629356.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/629356.htmlTechArticlePHP代码:-------------------------------------------------------------------------------- // 取商品分类 //*********************************************************************...