eViLaSh
Erfahrenes Mitglied
schon klar...
aber bisher hab ich das halt so:
und das is ja auch ziemlich kacke...
ich will also die "where cat_id = cat_pid" sache mit einem array anwenden, ist das möglich ?!
aber bisher hab ich das halt so:
PHP:
$sql = mysql_query("select * from tabelle");
while ($satz= @mysql_fetch_array($sql)) {
$sql2 = mysql_query("select * from tabelle where cat_pid = '$satz[cat_id]'");
while ($satz2= @mysql_fetch_array($sql2)) {
if( $satz[cat_id] == $satz2[cat_pid] ){
//echo $satz[cat_name];
echo "<div id=\"".$satz[cat_pid]."\" style=\"display:block;\"><A href=\"javascript:sh('".$satz[cat_id]."', 'bid".$satz[cat_id]."')\" class=\"links\"><img name=\"bid".$satz[cat_id]."\" src=\"../images/aufbau/cat_plus.gif\" width=\"9\" height=\"9\" border=\"0\"></a>".$satz[cat_name]."<br></div>";
}
}
}
und das is ja auch ziemlich kacke...
ich will also die "where cat_id = cat_pid" sache mit einem array anwenden, ist das möglich ?!