This is my code
<?php
$table='news';
$query1="SELECT count(id) FROM $table WHERE cat = 34";
$sql1=mysql_query($query1);
$count=mysql_result($sql1,0);
$lines=10;
// grab start position
if(isset($_GET['next']) && is_numeric($_GET['next']))
{
$start=$_GET['next'];
}
elseif(isset($_GET['pre']) && is_numeric($_GET['pre']))
{
$start=$_GET['pre'];
}else{
$start=0;
}
$hold=$start;
if($start>$count-$lines)
{
$start=$count-$lines;
}
if($start<0)
{
$start=0;
}
// loop through array from next
$query="SELECT * FROM ".$table." ORDER BY id LIMIT ".$start.",".$lines;
$sql=mysql_query($query);
while($row=mysql_fetch_assoc($sql))
{
?>
and i get this easy error
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/httpd/vhosts/rugbyleaguenz.com/httpdocs/thailand/index.php on line 90
line 90 is this one
$count=mysql_result($sql1,0);
any ideas what is wrong?