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
already printout it says 'Computers' and thats what i want it is but the computer value is in the databse?
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
Please help me to solved below mention code.. Error is "Unable to jump to row 0 on MySQL" <?php $t=0; if (isset($_POST["week_date1"]) || isset($_POST["week_date2"])) { $date1=date('d-m-Y', strtotime($_POST["week_date1"])); $date2=date('d-m-Y', strtotime($_POST["week_date2"])); $sql2 = "select usid,spid from register"; $result2 = mysql_query($sql2,$conn); $total=mysql_fetch_assoc($result2); while ($total<=mysql_fetch_assoc($result2)) { $id=mysql_result($result2,$t,"usid"); $sql = "select level, count(*) from legcount where spid='$id' and jdate >= '$date1' and jdate <= '$date2' group by level having count(level)>0"; $result = mysql_query($sql,$conn) ; $num=mysql_fetch_assoc($result); $i=0;$total=0;$ftotal=0;$ref=0; while ($i <= mysql_fetch_assoc($result)) { $f2=mysql_result($result,$i,"count(*)"); $total=$f2*25; $ftotal=$ftotal+$total; $i++; } ?> <tr class="tr1" align="center"> <td><?php echo $id;?></td> <td><?php echo $ftotal;?></td> <td>0</td> <td>0</td> <td>0</td> </tr> <?php $t++; } } ?>