1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
|
$blog .= "<ul class='blog_struktur'>";
$abfrage_group = mysql_query("SELECT * FROM chd_blog_group ORDER BY titel ASC");
while($row_group = mysql_fetch_object($abfrage_group))
{
$blog .= "<li>$row_group->titel<ul>";
$abfrage_kat = mysql_query("SELECT * FROM chd_blog_kat WHERE group_id='$row_group->id'");
while($row_kat = mysql_fetch_object($abfrage_kat))
{
$zahl = 0;
$abfrage = mysql_query("SELECT * FROM chd_blog WHERE kat_id='$row_kat->id' AND privat='0'");
$zahl += mysql_num_rows($abfrage);
if( $row->privat == 0){
$blog .= "<li><a href='index.php?section=code/blog&anzeige=$row_kat->id'>$row_kat->titel ($zahl)</a></li>";
}
}
$blog .= "</ul></li>";
}
$abfrage_kat = mysql_query("SELECT * FROM chd_blog_kat WHERE group_id=''");
while($row_kat = mysql_fetch_object($abfrage_kat))
{
$zahl = 0;
$abfrage = mysql_query("SELECT * FROM chd_blog WHERE kat_id='$row_kat->id' AND privat='0'");
$zahl += mysql_num_rows($abfrage);
if( $row->privat == 0){
$blog .= "<li><a href='index.php?section=code/blog&anzeige=$row_kat->id'>$row_kat->titel ($zahl)</a></li>";
}
}
$blog .= "</ul>"; |