467,092 Members | 1,134 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,092 developers. It's quick & easy.

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

KeredDrahcir
256MB
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
  • viewed: 2608
Share:
3 Replies
KeredDrahcir
256MB
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
256MB
If I put and exit(); command in it works. Can anyone suggest why?
Nov 1 '10 #3
KeredDrahcir
256MB
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.

Similar topics

reply views Thread by toufik toufik | last post: by
5 posts views Thread by Andrew James | last post: by
1 post views Thread by H.L Bai | last post: by
1 post views Thread by Dermot O'Loughlin | last post: by
reply views Thread by =?Utf-8?B?TG93bGFuZGVy?= | last post: by
8 posts views Thread by msnews.microsoft.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.