<?php
if (!$newsstart) {
$limit = "7";
$nstart = "0";
$nprev = "0";
$nnext = "$limit";
} else {
$newprev = ($newsstart - $limit);
$newnext = ($newsstart + $limit);
}
$con = mysql_connect("localhost", "$username", "$pass") or
die(mysql_error());
$db = mysql_select_db("pinehead",$con) or die(mysql_error());
$news = mysql_fetch_row(mysql_query("SELECT * FROM articles order by
artid desc $newsstart,$limit"));
$con = mysql_connect("localhost", "$pass", "$username") or
die(mysql_error());
$db = mysql_select_db("pinehead",$con) or die(mysql_error());
$sql = "SELECT * FROM articles";
$result = mysql_query($sql,$con);
while ($art = mysql_fetch_array($result)) {
$title = $art['title'];
$content = $art['content'];
echo $title;
echo ("<br>");
}
echo ("<a href=\"?newsstart=$nprev\">Back</a> <a
href=\"?newsstart=$nnext\">Next</a>");
?>
Thats my code
Warning: Supplied argument is not a valid MySQL result resource in nav.php on line 17
thats the error
$news = mysql_fetch_row(mysql_query("SELECT * FROM articles order by
artid desc $newsstart,$limit"));
thats line 17
Thanks for your help.
Anthony