WebProgrammerNewb22 Posted November 19, 2010 Share Posted November 19, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/219145-quick-help-on-a-database-error/ Share on other sites More sharing options...
WebProgrammerNewb22 Posted November 19, 2010 Author Share Posted November 19, 2010 any help would be appreciated.. even if you can just guide us in the right direction.. Quote Link to comment https://forums.phpfreaks.com/topic/219145-quick-help-on-a-database-error/#findComment-1136411 Share on other sites More sharing options...
PFMaBiSmAd Posted November 19, 2010 Share Posted November 19, 2010 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(). Quote Link to comment https://forums.phpfreaks.com/topic/219145-quick-help-on-a-database-error/#findComment-1136413 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.