While Schleife wird nicht ausgeführt o_O
Verfasst: 24.08.2005 21:47
Also nen ganz anderes Problem also ich habe 2 while schleifen wo bei die kleinere ausgeführt (also die in der einen ausgeführt) doch die die grosse wird nicht ausgeführt wenn da nen neuerer Eintrag kommt wird immer der neuere genommen o_O und ich weiss nicht warum...
Wäre nett wenn mir jemand helfen könnte<?
$cat_sql = "SELECT * FROM `cat` ORDER BY `stelle` ASC";
$cat_query = mysql_query($cat_sql);
while($cat_row = mysql_fetch_assoc($cat_query))
{
$catname = $cat_row['name'];
$catdesc = $cat_row['desc'];
$catstelle = $cat_row['stelle'];
$topic_sql = "SELECT * FROM `topic` WHERE `bycat` = '".$cat_row['ID']."'";
$topic_query = mysql_query($topic_sql);
define('CAT_SQL', true);
if(defined('CAT_SQL'))
{
include_once("template/$style/cat_topic.php");
while($topic_row = mysql_fetch_assoc($topic_query))
{
$topic_id = $topic_row['ID'];
$topicname = $topic_row['name'];
$topicdesc = $topic_row['desc'];
include("template/$style/topic_cat.php");
}
define('CAT_TOPIC_VIEW', true);
}
else
{
include_once("template/standard/cat_topic.php");
while($topic_row = mysql_fetch_assoc($topic_query))
{
$topic_id = $topic_row['ID'];
$topicname = $topic_row['name'];
$topicdesc = $topic_row['desc'];
include("template/standard/topic_cat.php");
}
define('CAT_TOPIC_VIEW', false);
}
}
?>