MrBillybob Posted August 19, 2007 Share Posted August 19, 2007 error: Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 7 in /home/content/t/u/b/tubguys/html/eve/index.php on line 607 Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 9 in /home/content/t/u/b/tubguys/html/eve/index.php on line 620 code: <?php $sql = 'SELECT * FROM `eve_corp_list`'; $res = mysql_query($sql, $server1); while($row = mysql_fetch_array($res)){ $i++; $totin = 0; $totout = 0; if (!isset($day)) { $day = date("d"); } $name = $row['charactername']; $members[$name]['name'] = $row['charactername']; $sql2 = 'SELECT `amount`, `ownerName2` FROM `eve_wallet` WHERE `ownerName2` = \'' . mysql_real_escape_string($row['charactername']) . '\' AND `amount` > 0 AND `date` >= \'' . $year . '-' . $month . '-' . $day . ' 00:00:00\' AND `date` <= \'' . $year . '-' . $month . '-' . $day . ' 24:00:00\''; $res2 = mysql_query($sql2, $server1); $temptyname = mysql_result($res2, 0, 'ownerName2'); //line 607 if ($temptyname == "") { $sql2 = 'SELECT `amount` FROM `eve_wallet` WHERE `ownerName1` = \'' . mysql_real_escape_string($row['charactername']) . '\' AND `amount` > 0 AND `date` >= \'' . $year . '-' . $month . '-' . $day . ' 00:00:00\' AND `date` <= \'' . $year . '-' . $month . '-' . $day . ' 24:00:00\''; $res2 = mysql_query($sql2, $server1); } while($row2 = mysql_fetch_array($res2)){ $totin = $totin + $row2['amount']; } $members[$name]['posin'] = $totin; $sql2 = 'SELECT `amount`, `ownerName2` FROM `eve_wallet` WHERE `ownerName2` = \'' . mysql_real_escape_string($row['charactername']) . '\' AND `amount` < 0 AND `date` >= \'' . $year . '-' . $month . '-' . $day . ' 00:00:00\' AND `date` <= \'' . $year . '-' . $month . '-' . $day . ' 24:00:00\''; $res2 = mysql_query($sql2, $server1); $temptyname = mysql_result($res2, 0, 'ownerName2'); //line 620 if ($temptyname == "") { $sql2 = 'SELECT `amount` FROM `eve_wallet` WHERE `ownerName1` = \'' . mysql_real_escape_string($row['charactername']) . '\' AND `amount` < 0 AND `date` >= \'' . $year . '-' . $month . '-' . $day . ' 00:00:00\' AND `date` <= \'' . $year . '-' . $month . '-' . $day . ' 24:00:00\''; $res2 = mysql_query($sql2, $server1); } while($row2 = mysql_fetch_array($res2)){ $totout = $totout + $row2['amount']; } $members[$name]['posout'] = $totout; $count++; } $i = 0; $res = mysql_query($sql, $server1); while($row = mysql_fetch_array($res)){ if ($row['charactername'] != "") { $totin = 0; $totout = 0; ?> <tr> <td class="row<?php echo fmod($i, 2); ?>"> <?php echo "<a href=\"?l=wallet&division=all&month=".date("m")."&year=".date("Y")."&day=".$day."&memberid=".$row['id']."&view=refer_members\">" . $members[$row['charactername']]['name'] . "</a>"; ?> </td> <td class="row<?php echo fmod($i, 2); ?>"> <?php echo "<div class=\"green\">" . number_format($members[$row['charactername']]['posin'], 2, '.', ',') . "</div>"; ?> </td> <td class="row<?php echo fmod($i, 2); ?>"> <?php echo "<div class=\"red\">" . number_format($members[$row['charactername']]['posout'], 2, '.', ',') . "</div>"; ?> </td> <td class="row<?php echo fmod($i, 2); ?>"> Type Totals </td> </tr> <?php $i++; } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/65662-mysql-errorcant-find-it/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.