 |
|
|  |
|
 |
15년 전 |
<?
function getCategoryPath(&$DirNameArray, $ParentDIrID = 0)
{
static $CategoryCount = 0;
$sql = "SELECT 코드, 카테고리명 FROM 카테고리 WHERE
부모코드 = $ParentDIrID ORDER BY 코드 DESC";
$res = mysql_query($sql);
if(mysql_num_rows($res) > 0) {
while($rs = mysql_fetch_row($res)) {
$DirName = $rs[1];
$childParentDIrID = $rs[0];
$DirNameArray[$CategoryCount][] = $DirName;
getCategoryPath($DirNameArray, $childParentDIrID);
}
}
else {
$CategoryCount++;
return;
}
}
getCategoryPath($category_path);
?>
|
|
추천 : 782 |
추천
목록
|
|
|  |
|