Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-27-2011, 03:05 AM   PM User | #1
coleman
New to the CF scene

 
Join Date: Jun 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
coleman is an unknown quantity at this point
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);
coleman is offline   Reply With Quote
Old 06-27-2011, 05:53 PM   PM User | #2
Fumigator
UE Antagonizer


 
Fumigator's Avatar
 
Join Date: Dec 2005
Location: Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
Posts: 7,686
Thanks: 42
Thanked 637 Times in 625 Posts
Fumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of light
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.
__________________
Fumigator is offline   Reply With Quote
Reply

Bookmarks

Tags
debug, mysql

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:05 PM.


Advertisement
Log in to turn off these ads.