Verfasst: Mi 9. Mär 2005, 15:48
uffffffffffffff, ich hatte es schon verschoben, du warst zu langsam. OK, ich setze bei 4.4 einen Beitrag mit einem Link hierher rein.
Das Diskussionsforum zum Open Source Content Management System
https://forum.contenido.org/
Code: Alles auswählen
function conDeeperCategoriesArray($idcat_start)
{
global $db, $client, $cfg;
$sql = "SELECT
*
FROM
".$cfg["tab"]["cat_tree"]." AS A,
".$cfg["tab"]["cat"]." AS B
WHERE
A.idcat = B.idcat AND
idclient = '".$client."'
ORDER BY
idtree";
$db->query($sql);
$found = false;
while ( $db->next_record() ) {
if ($found && $db->f("level") <= $curLevel) { // ending part of tree
$found = false;
}
if ($db->f("idcat") == $idcat_start) { // starting part of tree
$found = true;
$curLevel = $db->f("level");
}
if ($found) {
$catstring[] = $db->f("idcat");
}
}
return $catstring;
}