Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unable to jump to row 0 on MySQL result index 8

    I am getting this error about this script. Can I just change all the zeros to something else?

    $site=mysql_result($result,0,"site");
    $language=mysql_result($result,0,"language");
    $url=mysql_result($result,0,"url");
    $b=mysql_result($result,0,"b");
    @mysql_free_result($result);

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Your resultset is probably empty, resulting in that error. You should check the resultset to see if it's empty first, then fetch data from it if it's not empty.

    But I have to ask, why are you not using a function that fetches the entire row at once, such as mysql_fetch_array()? It's much faster with less code.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •