- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
<?
mysql_connect("localhost", "root",""); mysql_select_db("BD");
//$zapros=mysql_query("select * from test where id=0"); //echo ($zapros);
function menu($parent,$h) { $h++;
$zapros=mysql_query("select * from test where id={$parent}");
while($row=mysql_fetch_array($rezult)) { echo "{$row['name']}
";
$zapros1=mysql_query("select * from test where key={$row['id']}");
while ($row1=mysql_fetch_array($zapros1)){ echo "
{$row1['name']}
"; $p=$row1['id']; menu($p,$h);
}
}
}
menu(0,0);
?>
eth0 20.07.2011 19:32 # +14
Batadase.
JeremyW 20.07.2011 19:40 # 0
RomaShka 21.07.2011 21:39 # +1
Lure Of Chaos 20.07.2011 19:50 # +2
bugmenot 20.07.2011 19:50 # 0
substr 20.07.2011 22:24 # 0
Lure Of Chaos 20.07.2011 19:52 # +1
TheHamstertamer 20.07.2011 19:59 # +6
ммм
nobody 20.07.2011 20:36 # +2
mmmmmm ....
guest 30.07.2011 11:37 # −1
AlexanderC 03.08.2011 16:56 # 0