Hey Leute,
ich weiß einfach nicht, wo der Fehler liegt ..
Das wird mir als Fehler gezeigt :
Das habe ich gescriptet
Wäre super, wenn mir einer helfen könnte.
Grüße, ti8
ich weiß einfach nicht, wo der Fehler liegt ..
Das wird mir als Fehler gezeigt :
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /mnt/web7/43/20/51785920/htdocs/index.php on line 37
Das habe ich gescriptet
<?php
include("include/dbconnect.php");
include("include/sess.php");
$sqlt1 = "SELECT * FROM texte WHERE db_txtid = '7'";
$rest1 = mysql_query($sqlt1);
while($row = mysql_fetch_assoc($rest1)) {
$db_txtid1 = $row['db_txtid'];
$db_txtcontent1 = $row['db_txtcontent'];
}
$header = $db_txtcontent1;
include("include/header.php");
include("include/left.php");
$sqlt8 = "SELECT * FROM texte WHERE db_txtid = '8'";
$rest8 = mysql_query($sqlt8);
while($row = mysql_fetch_assoc($rest8)) {
$db_txtid8 = $row['db_txtid'];
$db_txtcontent8 = $row['db_txtcontent'];
print ("<tr><td>$db_txtcontent8</td></tr>");
}
print ("
<tr><td> </td></tr>
<tr><td id='linebsk'><img src='img/clearpix2.gif' width='488' height='1' border='0'></td></tr>
<tr><td height=20><b>Unsere Top-Artikel:</b></td></tr>
<tr><td id='linebsk'><img src='img/clearpix2.gif' width='488' height='1' border='0'></td></tr>
<tr><td> </td></tr>
<tr><td>
<table width=480 border=0 cellpadding=0 cellspacing=0>");
$topartstart=0; $topartend=3;
for ($i=0;$i<$db_topid1;$i++) {
print ("<tr>");
$x=1;
$sqla1 = "SELECT * FROM topartikel ORDER by db_topid DESC limit $topartstart, $topartend";
$resa1 = mysql_query($sqla1);
while($row = mysql_fetch_assoc($resa1)) {
$db_topid = $row['db_topid'];
$db_topart = $row['db_topart'];
$db_toptitel = $row['db_toptitel'];
$db_toppreis = $row['db_toppreis'];
$db_topimg = $row['db_topimg'];
$db_topimgw = $row['db_topimgw'];
$db_topimgh = $row['db_topimgh'];
if ($db_topimg != '') { $image= "artikel/".$db_topimg;
if ($db_topimgw>=$db_topimgh) {
$breite = "100"; $brprozent = ((100 * $breite) / $db_topimgw);
$hoehe = (($db_topimgh * $brprozent) / 100); $hoehe = (ceil ($hoehe));
}
else { $hoehe = "67"; $brprozent = ((100 * $hoehe) / $db_topimgh);
$breite = (($db_topimgw * $brprozent) / 100); $breite = (ceil ($breite));
}
}
else {
$image = "img/nopic3.png"; $breite = "100"; $hoehe = "67";
}
$len = strlen($db_toptitel);
if ($len>17) {
$db_toptitel = substr($db_toptitel, 0, 17); $db_toptitel .= "...";
}
print ("<td width=150 id='toptab'>
<table width=150 border=0 cellpadding=0 cellspacing=0>
<tr><td align=center height=105><a href='details.php?kat=0&sess=$sess&ts=$ts&next=0&page=0&back=index&artikel=$db_topart' onFocus='if (this.blur) this.blur()'><img src='$image' width='$breite' height='$hoehe' style='border:1px solid #cccccc;'></a></td></tr>
<tr><td align=center height=20><a href='details.php?kat=0&sess=$sess&ts=$ts&next=0&page=0&back=index&artikel=$db_topart' onFocus='if (this.blur) this.blur()'>$db_toptitel</a></td></tr><tr><td height=15 align=center><b>$db_adminwaehrung $db_toppreis</b></td></tr>
</table>
</td>");
if ($x!='3') {
print ("<td width=15 id='space'> </td>");
}
$x++;
}
print ("</tr><tr><td> </td></tr>");
$topartstart=$topartstart + 3;
}
print ("
</table>
</td></tr>
");
include("include/pages0.php");
include("include/right.php");
include("include/footer.php");
mysql_close($verbindung);
?>
Wäre super, wenn mir einer helfen könnte.
Grüße, ti8