Jump to content

Quick help on a database error


WebProgrammerNewb22

Recommended Posts

Hey guys, i'm trying to help my buddy out with a contact database and we ran into a problem I was hoping you guys could help me out with.  Everything is working except his update contact page.  The error is the following, where do you think we should start in fixing this problem??

 

Error:

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in /home/stofikj2/public_html/hw5/updcontact.php on line 55

 

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in /home/stofikj2/public_html/hw5/updcontact.php on line 56

 

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in /home/stofikj2/public_html/hw5/updcontact.php on line 57

 

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in /home/stofikj2/public_html/hw5/updcontact.php on line 58

 

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in /home/stofikj2/public_html/hw5/updcontact.php on line 59

 

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in /home/stofikj2/public_html/hw5/updcontact.php on line 60

 

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in /home/stofikj2/public_html/hw5/updcontact.php on line 61

 

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in /home/stofikj2/public_html/hw5/updcontact.php on line 62

 

 

Link to comment
Share on other sites

The error either means that your query failed or that there are zero rows in the result set (mysql_result() has the misfortune of being the only mysql statement that produces an error simply because there are no rows, other methods of fetching data from a result set return a false value when there are no rows.) It is also possible that you are reusing a variable or overwritting it or using the wrong variable name in the mysql_result() statement.

 

You would need to troubleshoot A) If the query failed or not, and B) if your query worked, why there are no matching rows.

 

Your code should already testing if the query worked before attempting to access any of the data from the query and also using mysql_num_rows() to check if there are any rows in the result set before attempting to use mysql_result().

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.