Min kode skriver fejl men kan ikke finde fejlen
Hej! Efter jeg skrev den understående kode meldte den at der var en mySQL fejl. Men har tjekket det hele igennem, og alle tabellerne findes.Fejlen er:Warning: Supplied argument is not a valid MySQL result resource in d:\web\artikler\index.php on line 23
Her er koden nogle der kan hjælpe med hvor fejlen er
<?php
include "../config/database.php";
include "../config/funktioner.php";
include "../inc/header.html";
overskrift("Artikler");
$antal = $artikelPrside; // nallerne væk brug config.php
if ($_POST['start'] == "") $start = 0;
else $start = $_POST['start'];
echo "<DIV align=left>";
echo "<TABLE id=\"artikelForside\" style=\"BORDER-COLLAPSE: collapse\" borderColor=#111111 height=1 cellSpacing=0 cellPadding=0 width=339 border=0>";
echo "<TBODY>";
$art_sql = mysql_query("SELECT * FROM fx_artikler WHERE accept=1 ORDER BY id DESC LIMIT $start,$antal");
while ($row = mysql_fetch_array($art_sql)){
//Henter Artikel:
echo "<TR><TD vAlign=top width=83 height=10></TD>";
echo "<TD vAlign=top width=250 height=10>$row[overskrift]</TD></TR>";
echo "<TR><TD vAlign=top width=83 height=1 rowSpan=2><img src=\"/ikoner/$row[ikon]/\" border=\"0\"></TD>";
echo "<TD vAlign=top width=250 height=19>"; maxtegn($row[artikel], $tegnArtikel);
echo "</TD></TR><TR>";
echo "<TD vAlign=top width=250 height=1>Skrevet af $row[poster]</TD></TR>";
}
echo "</TBODY></TABLE></DIV>";
echo "<DIV align=left><TABLE id=AutoNumber1 style=\"BORDER-COLLAPSE: collapse\" borderColor=#111111 height=10 cellSpacing=0 cellPadding=0 width=100% border=0>";
echo "<TBODY><TR><TD width=100% height=10><P align=right><FONT face=Tahoma><SPAN style=\"FONT-SIZE: 11px\">Gå til side </SPAN></FONT></P></TD>";
echo "<TD width=87 height=10><FONT style=\"FONT-SIZE: 11px\" face=Tahoma><form action=\"#\" method=\"post\"><br> <select style=\"color: #000000; font-size: 11px; font-family: Tahoma; border: 0px solid #000000; background-color: #EEEEEE\" onchange=\"submit();\" name=\"start\">";
$q = mysql_query("SELECT * FROM fx_artikler WHERE accept=1");
$rows = mysql_num_rows($q);
for ($i = 0;$i<ceil($rows/$antal);$i++) {
echo "<option ";
if ($start == ($i*$antal)) echo "selected ";
echo "value=\"".($i*$antal)."\">".($i+1);
}
echo "</select></form>";
echo "</FONT></TD></TR></TBODY></TABLE></DIV>";
include "../inc/bottom.html";
?>
