Remortgages - Web Advertising - Share Prices - Credit Cards - Free File Hosting

PDA

View Full Version : Another::mysql_result()[function.mysql-result]:Unable to jump to row 0 on..


jigen7
Nov 9th 2007, 5:02 pm
im getting the errors unable to jump to row........
not working:
$sql2 ="Select LinkCategoryID from LinkCategories where LinkCategoryName ='$arr[5]'";
$result3=mysql_query($sql2,$conn_id);
$y = 0;
$count3 = mysql_num_fields($result3);
while ($y < $count3) {
$res_linkuserid=mysql_result($result3,$y,"LinkCategoryID"); ;
$y++;
}

is there sumthing wrong with my code i need to get the LinkCategoryID depending on the given LinkCategoryName which is in $arr[5] from table LinkCategories??anyone can help me throughout here because this code is perfectly running but the one i have posted in the upper part is not weird
working:
$sql ="Select UserID from Users where UserName = '$user[1]'";
$result2=mysql_query($sql,$conn_id);
$x = 0;
$count2 = mysql_num_fields($result2);
while ($x < $count2) {
$res_userid=mysql_result($result2,$x,"UserID");
$x++;
}

?? thx

armatik
Nov 9th 2007, 5:06 pm
Print out $array and see what's going on in there.

jigen7
Nov 9th 2007, 5:08 pm
already printout it says 'Computers' and thats what i want it is but the computer value is in the databse?

armatik
Nov 9th 2007, 5:11 pm
What's the error exactly?

jigen7
Nov 9th 2007, 5:12 pm
it gives two errors i only need 1 value
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 19 in E:\wwwroot\htdocs\jigen\consolidate\index.php on line 467

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 22 in E:\wwwroot\htdocs\jigen\consolidate\index.php on line 467