Please help this is driving me nuts!

Can someone please help me figure out why my site is giving me the three errors below?

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 2 in D:\Hosting\4438031\html\view2.php on line 15

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 2 in D:\Hosting\4438031\html\view2.php on line 44

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 2 in D:\Hosting\4438031\html\view2.php on line 59

Index.php Code:

Ezose

view.php code:

<? include('cms/inc/config.php'); connect(); if(!$_GET["id"]){ $id=10; } else{$id=$_GET["id"];} $pageid=$id; $query="select * from pages where id=".$pageid; $result=mysql_query($query); $num=mysql_numrows($result); $a=0; if(mysql_result($result,$a,"left_callout")!=0){ $query4="select * from callouts where id=".mysql_result($result,$a,"left_callout"); $result4=mysql_query($query4); $num4=mysql_numrows($result4); $d=0; } if (!$result) { die('Could not query:' . mysql_error()); } $query7="select * from pages,templates where pages.template=templates.id and parent=2 order by page_order"; $result7=mysql_query($query7); $num7=mysql_numrows($result7); $h=0; $query8="select * from pages_callouts where pageid=".$pageid; $result8=mysql_query($query8); $num8=mysql_numrows($result8); $e=0; ?> <?echo mysql_result($result,$a,"title");?> <?echo mysql_result($result,$a,"metadata");?>
Ezose
secure partner download

<?include("inc/nav.php");?> <?echo mysql_result($result,$a,"content");?>

Please let me know if you need anything else.

Hi,

IF you are getting the right output than just put @ before the field from which you are getting the warning message if not than just let me know I will help you.

need error messages after each query to see what the problem is just hiding the warning is not fixing the problem

echo "Query: " . $query;

make sure these are getting a result
mysql_num_rows()

if (!$resultt) {
die(‘Query failure Query: $query
’ . mysql_error());
}

Sponsor our Newsletter | Privacy Policy | Terms of Service