Xyla
02.09.2003, 07:02
Hallo Leute,
ich bin mal wieder ratlos.
Seit nunmehr mehreren Jahren (2-3 ;)) betreiben wir auf unserer Fanpage eine Livetabelle, welche PHP und MySQL gestützt ist.
Bis gestern Nachmittag lief Sie auch ohne Probleme.
Seit gestern abend haut das Ding nicht mehr hin. Bei der Tordifferenz spinnt Sie, sobald neative Werte heraus kommen.
Ist ne neue PHP Version raus, die das anders macht oder was könnte die Ursache sein ?
Ich habe das Script seit über einem Jahr nicht angerührt!
Hier der Link, welcher den derzeitigen Zustand zeigt (http://www.sachsen-leipzig.de/tabelle/tabelle.php3)
und hier Auszüge aus dem Quelltext:
$query = MYSQL_QUERY("SELECT id, name, spiele, (tore + t) AS tplus,
(gegentore + gt) AS tminus, ((tore + t) - (gegentore + gt)) AS diff ,(punkte
+ p) AS pstand, status FROM tipp_vereine, tipp_temp WHERE id = vid
ORDER BY pstand DESC, diff DESC");
$place = 1;
while ($row = MYSQL_FETCH_OBJECT($query))
{
$style = ""; // <- Hier ggf. andere Standard-Style-Klasse angeben, falls gewünscht
if ($place < 3) { $style = "aufsteiger"; }
else if ($place > 14) { $style = "absteiger"; }
if ($row->id == 1) { $style = "fcs"; }
if ($row->status == 1)
{
$style .= "hi"; // Vorläufige Einträge kennzeichnen
$row->spiele++;
}
if ($row->tplus < 10) { $row->tplus = " ".$row->tplus; }
if ($row->tminus < 10) { $row->tminus .= " "; }
echo "\n <TR>";
echo "\n <TD ALIGN=\"CENTER\" CLASS=\"$style\">$place</TD>";
echo "\n <TD ALIGN=\"LEFT\" CLASS=\"$style\">".$row->name."</TD>";
echo "\n <TD ALIGN=\"CENTER\" CLASS=\"$style\">".$row->spiele."</TD>";
echo "\n <TD ALIGN=\"CENTER\" CLASS=\"$style\">".$row->tplus." : ".$row->tminus."</TD>";
echo "\n <TD ALIGN=\"CENTER\" CLASS=\"$style\">".$row->diff."</TD>";
echo "\n <TD ALIGN=\"CENTER\" CLASS=\"$style\">".$row->pstand."</TD>";
echo "\n </TR>";
$place++;
}
MYSQL_CLOSE($connect);
?>
und so hab ich mir dann geholfen, aber warum funktiert das obere Beispiel bis gestern Mittag und danach nicht mehr ???
$query = MYSQL_QUERY("SELECT id, name, spiele, tore, gegentore, (tore + t) AS tplus,
(gegentore + gt) AS tminus, ((tore + t) - (gegentore + gt)) AS diff ,(punkte
+ p) AS pstand, status FROM tipp_vereine, tipp_temp WHERE id = vid
ORDER BY pstand DESC, diff DESC");
$place = 1;
while ($row = MYSQL_FETCH_OBJECT($query))
{
$style = ""; // <- Hier ggf. andere Standard-Style-Klasse angeben, falls gewünscht
if ($place < 3) { $style = "aufsteiger"; }
else if ($place > 14) { $style = "absteiger"; }
if ($row->id == 1) { $style = "fcs"; }
if ($row->status == 1)
{
$style .= "hi"; // Vorläufige Einträge kennzeichnen
$row->spiele++;
}
if ($row->tplus < 10) { $row->tplus = " ".$row->tplus; }
if ($row->tminus < 10) { $row->tminus .= " "; }
$diff=$row->tore-$row->gegentore;
echo "\n <TR>";
echo "\n <TD ALIGN=\"CENTER\" CLASS=\"$style\">$place</TD>";
echo "\n <TD ALIGN=\"LEFT\" CLASS=\"$style\">".$row->name."</TD>";
echo "\n <TD ALIGN=\"CENTER\" CLASS=\"$style\">".$row->spiele."</TD>";
echo "\n <TD ALIGN=\"CENTER\" CLASS=\"$style\">".$row->tplus." : ".$row->tminus."</TD>";
echo "\n <TD ALIGN=\"CENTER\" CLASS=\"$style\">".$diff."</TD>";
echo "\n <TD ALIGN=\"CENTER\" CLASS=\"$style\">".$row->pstand."</TD>";
echo "\n </TR>";
$diff="";
$place++;
}
MYSQL_CLOSE($connect);
?>
Ich hoffe Ihr könnt mir weiterhelfen und bedanke mich schonmal
MfG
Xyla
ich bin mal wieder ratlos.
Seit nunmehr mehreren Jahren (2-3 ;)) betreiben wir auf unserer Fanpage eine Livetabelle, welche PHP und MySQL gestützt ist.
Bis gestern Nachmittag lief Sie auch ohne Probleme.
Seit gestern abend haut das Ding nicht mehr hin. Bei der Tordifferenz spinnt Sie, sobald neative Werte heraus kommen.
Ist ne neue PHP Version raus, die das anders macht oder was könnte die Ursache sein ?
Ich habe das Script seit über einem Jahr nicht angerührt!
Hier der Link, welcher den derzeitigen Zustand zeigt (http://www.sachsen-leipzig.de/tabelle/tabelle.php3)
und hier Auszüge aus dem Quelltext:
$query = MYSQL_QUERY("SELECT id, name, spiele, (tore + t) AS tplus,
(gegentore + gt) AS tminus, ((tore + t) - (gegentore + gt)) AS diff ,(punkte
+ p) AS pstand, status FROM tipp_vereine, tipp_temp WHERE id = vid
ORDER BY pstand DESC, diff DESC");
$place = 1;
while ($row = MYSQL_FETCH_OBJECT($query))
{
$style = ""; // <- Hier ggf. andere Standard-Style-Klasse angeben, falls gewünscht
if ($place < 3) { $style = "aufsteiger"; }
else if ($place > 14) { $style = "absteiger"; }
if ($row->id == 1) { $style = "fcs"; }
if ($row->status == 1)
{
$style .= "hi"; // Vorläufige Einträge kennzeichnen
$row->spiele++;
}
if ($row->tplus < 10) { $row->tplus = " ".$row->tplus; }
if ($row->tminus < 10) { $row->tminus .= " "; }
echo "\n <TR>";
echo "\n <TD ALIGN=\"CENTER\" CLASS=\"$style\">$place</TD>";
echo "\n <TD ALIGN=\"LEFT\" CLASS=\"$style\">".$row->name."</TD>";
echo "\n <TD ALIGN=\"CENTER\" CLASS=\"$style\">".$row->spiele."</TD>";
echo "\n <TD ALIGN=\"CENTER\" CLASS=\"$style\">".$row->tplus." : ".$row->tminus."</TD>";
echo "\n <TD ALIGN=\"CENTER\" CLASS=\"$style\">".$row->diff."</TD>";
echo "\n <TD ALIGN=\"CENTER\" CLASS=\"$style\">".$row->pstand."</TD>";
echo "\n </TR>";
$place++;
}
MYSQL_CLOSE($connect);
?>
und so hab ich mir dann geholfen, aber warum funktiert das obere Beispiel bis gestern Mittag und danach nicht mehr ???
$query = MYSQL_QUERY("SELECT id, name, spiele, tore, gegentore, (tore + t) AS tplus,
(gegentore + gt) AS tminus, ((tore + t) - (gegentore + gt)) AS diff ,(punkte
+ p) AS pstand, status FROM tipp_vereine, tipp_temp WHERE id = vid
ORDER BY pstand DESC, diff DESC");
$place = 1;
while ($row = MYSQL_FETCH_OBJECT($query))
{
$style = ""; // <- Hier ggf. andere Standard-Style-Klasse angeben, falls gewünscht
if ($place < 3) { $style = "aufsteiger"; }
else if ($place > 14) { $style = "absteiger"; }
if ($row->id == 1) { $style = "fcs"; }
if ($row->status == 1)
{
$style .= "hi"; // Vorläufige Einträge kennzeichnen
$row->spiele++;
}
if ($row->tplus < 10) { $row->tplus = " ".$row->tplus; }
if ($row->tminus < 10) { $row->tminus .= " "; }
$diff=$row->tore-$row->gegentore;
echo "\n <TR>";
echo "\n <TD ALIGN=\"CENTER\" CLASS=\"$style\">$place</TD>";
echo "\n <TD ALIGN=\"LEFT\" CLASS=\"$style\">".$row->name."</TD>";
echo "\n <TD ALIGN=\"CENTER\" CLASS=\"$style\">".$row->spiele."</TD>";
echo "\n <TD ALIGN=\"CENTER\" CLASS=\"$style\">".$row->tplus." : ".$row->tminus."</TD>";
echo "\n <TD ALIGN=\"CENTER\" CLASS=\"$style\">".$diff."</TD>";
echo "\n <TD ALIGN=\"CENTER\" CLASS=\"$style\">".$row->pstand."</TD>";
echo "\n </TR>";
$diff="";
$place++;
}
MYSQL_CLOSE($connect);
?>
Ich hoffe Ihr könnt mir weiterhelfen und bedanke mich schonmal
MfG
Xyla