By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,743 Members | 804 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,743 IT Pros & Developers. It's quick & easy.

How to fix mysql_result error that occurs only when using Google Chrome

KeredDrahcir
100+
P: 426
Can anyone help me. I don't know if this is a mysql, php or Google Chrome error.
I have a login form but for some reason I'm getting an error when I use Google Chrome. It used to work in all browsers (IE, Firefox, Safari, Opera, Google Chrome) but for some reason it has stopped working and Google Chrome. I assume it has something to do with me upgrading to Windows 7.

The error is this:
Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 30 in /server path/file.php on line 26

The code around this is as follows (line 26 is the second line):
Expand|Select|Wrap|Line Numbers
  1.   $result = mysql_query("SELECT variable FROM table WHERE field='value'");
  2.   $_SESSION['name']=mysql_result($result, 0);
Is there something I'm doing wrong. I've had problems with Google Chrome before that I had to fix.
Nov 1 '10 #1
Share this Question
Share on Google+
3 Replies


KeredDrahcir
100+
P: 426
I think the problem is quite different. The code isn't supposed to reach line 26 and therefore it is trying to perform the queary with values it doesn't have.

The code is supposed to do this:
Expand|Select|Wrap|Line Numbers
  1.     echo "<script langauge='javascript'>location.href='new folder/index.php';</script>";
  2.  
I;ve had problems with Script tags in Google Chrome before. Is there anyway I can get them to work.
Nov 1 '10 #2

KeredDrahcir
100+
P: 426
If I put and exit(); command in it works. Can anyone suggest why?
Nov 1 '10 #3

KeredDrahcir
100+
P: 426
I think in Chrome it ties to run the whole page and then do the Javascript and so it runs my page, decides to come back to the Javascript later and continues running the page where the Javascript would have directed it somewhere else.

Is this a possibility? If anyone can help I may be able to work around this. If this is true maybe someone should file a bug with Google.
Nov 1 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.