hallo leute!!
ich weiß leider fehler nicht, hab schon google und forum gesucht find aber nichts.
könnte mir wer sagen was ich machen soll?
Fehler:
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /var/www/html/menu/show_carsunfall.php on line 42
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/html/menu/show_carsunfall.php on line 43
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /var/www/html/menu/show_carsunfall.php on line 83
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/html/menu/show_carsunfall.php on line 84
ich weiß leider fehler nicht, hab schon google und forum gesucht find aber nichts.
könnte mir wer sagen was ich machen soll?
Fehler:
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /var/www/html/menu/show_carsunfall.php on line 42
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/html/menu/show_carsunfall.php on line 43
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /var/www/html/menu/show_carsunfall.php on line 83
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/html/menu/show_carsunfall.php on line 84
PHP-Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Unbenanntes Dokument</title>
<link href="../admin/stil.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container">
<div id="header">Alle Autos </div>
<div id="tablet">
<? if (!isset($_REQUEST['id']))
{
?>
<table>
<?
// fix number of pages
if ($_REQUEST['Pages'])
{
$Anz = $_REQUEST['Pages'];
$_REQUEST['page'] = 1;
}
else
{
$Anz = 6;
}
//check pages
if ($_REQUEST['page'])
{
$page = $_REQUEST['page'];
$Untergrenze = ($page-1) * $Anz;
$Obergrenze = $Untergrenze + ($Anz-1);
}
else
{
$Untergrenze = 0;
$Obergrenze = ($Anz-1);
}
$SQL = "SELECT * FROM autos LIMIT $Untergrenze, $Obergrenze";
$ResultP = mysql_query($SQL, $DB);
for ($i = 0; $i < mysql_num_rows($ResultP); $i++)
{
$Result = mysql_fetch_object($ResultP);
?>
<tr>
<td><? //Read Cars
$SQL2 = "SELECT ID FROM bilder WHERE Auto = '".$Result->ID."' AND Local = 'Car' LIMIT 0,1";
$RP2 = mysql_query($SQL2);
if (mysql_num_rows($RP2)>0)
{
$Result2 = mysql_fetch_object($RP2);
$BID = $Result2->ID;
echo '<a href = "?seite=auto&id='.$Result->ID.'">
<img border = "0" name="car" src="admin/scalbild.php?ID='.$BID .'&x=100" alt=""></a>';
}
else
{
echo '<a href = "?seite=auto&id='.$Result->ID.'">
<img src="cms_images/noimage.png" width="100" height="70"></a>';
}
?> </td>
<td><? echo '<a href = "?seite=auto&id='.$Result->ID.'">'.$Result->Titel.'</a>'; ?></td>
<td><? echo '<a href = "?seite=auto&id='.$Result->ID.'">'.$Result->Preis.'</a>'; ?></td>
</tr>
<?
}
?>
</table>
<?
}
else
{
}
?>
</div>
<div id="footer">
<p align="left">
<?
$SQL = "SELECT * FROM autos ORDER BY ID DESC";
$ResultPointer = mysql_query($SQL, $DB);
$Entrys = mysql_num_rows($ResultPointer);
$AnzSeiten = intval($Entrys / $Anz);
if ($Entrys % $Anz>0)
{
$AnzSeiten++ ;
}
for($i = 0; $i < $AnzSeiten; $i++)
{
$Stamm = str_replace("&page=".$_REQUEST['page'],"",$_SERVER['REQUEST_URI']);
echo "<a class=\"linkt\" href=\"".$Stamm."&page=".($i+1)."\">|".($i+1)."|</a>";
echo ", ";
}
?>
<form name="form1" method="post" action="<? echo $_SERVER['REQUEST_URI'] ;?>">
Autos pro Seite anzeigen:
<select name="Pages">
<option selected>5</option>
<option>10</option>
<option>15</option>
</select>
<input type="submit" name="Submit" value="OK">
</form>
</p>
<p>powered by ControlPanel</p>
</div>
</div>
</body>
</html>
Kommentar