Hallo Board,
indent ist ewig leer. Da sollten 's drin sein.
Sieht jemand warum ?
[0] => Array
(
[payload] => Shop
[level] => 1
[node_id] => 1[indent] =>
PHP-Code:
$res =& $db->query("
SELECT node1.payload,
COUNT(*) AS level, node1.node_id
FROM node AS node1,
node AS node2
WHERE node1.root_id = 1
AND node2.root_id = 1
AND node1.lft BETWEEN node2.lft AND node2.rgt
GROUP BY node1.LFT");
while($row =& $res->fetchRow(DB_FETCHMODE_ASSOC)) {
$indent = '';
for($i = 0; $i < $row['level']; $i++) {
$indent .= " ";
}
$row['indent'] = $indent;
$categories[] = $row;
}
echo "<pre>";
print_r($categories);
echo "</pre>";
Sieht jemand warum ?
[0] => Array
(
[payload] => Shop
[level] => 1
[node_id] => 1[indent] =>
Kommentar