RE: [PHP] "Unable to Jump Row" ?!?

From: Date: Thu, 17 Jan 2002 22:38:52 +0000
Subject: RE: [PHP] "Unable to Jump Row" ?!?
Groups: php.general 
Request: Send a blank email to php-general+get-80992@lists.php.net to get a copy of this message
> Here is the error... > > Warning: Unable to jump to row 1 on MySQL result index 2 in > /blahblahblah/patient/display_search_results.php on line 39 This means that the query you executed didn't return enough rows to count up to ... 1. > Here is the code on line 39.... > > $d = mysql_result($result, $c, "id"); > > the field "id" is an auto_increment column. > $c is an exsisting row in the query, $result. > > Any help? Yes, it looks like $result doesn't contain anything, so maybe your SQL is messed up. When you execute queries, you should do: if ($result = mysql_query($sql, $mysql_connection)) { // It worked, proceed } else { // It didn't work, die. echo "MySQL failed: ".mysql_error(); } ... that will tell you what went wrong. > Is there a way to tell MySQL to shut the hell up on certain > pages? Yes, if you put a @ in front of any function call it will supress error messages. However, it's a better idea to fix the cause of the error messages :) Jason

« previous php.general (#80992) next »