Jump to content

[SOLVED] Now I am confused...


maxudaskin

Recommended Posts

<?php
$result = mysql_query("select * from users ORDER BY pid");
while($row = mysql_fetch_array($result))
  {if($colourbare == 1){
  echo '';
  $colour = '#F2F2F2';
  }else{
  $colour = '#E2E2E2';
  echo '';
  }
  echo "<tr>";
  
  echo "<td bgcolor='". $colour ."'><a href='../user.php?pid=" . $row['pid'] . "' class='ab'>" . $row['fname'] . "</td>";
  echo "<td bgcolor='". $colour ."'><a href='../user.php?pid=" . $row['pid'] . "' class='ab'>" . $row['lname'] . "</td>";
  echo "<td bgcolor='". $colour ."'><a href='../user.php?pid=" . $row['pid'] . "' class='ab'>" . $row['pid'] . "</td>";
  echo "<td bgcolor='". $colour ."'><a href='../user.php?pid=" . $row['pid'] . "' class='ab'>" . $row['hub'] . "</td>";
  echo "<td bgcolor='". $colour ."'><a href='../user.php?pid=" . $row['pid'] . "' class='ab'>" . $row['country'] . "</td>";
  echo "<td bgcolor='". $colour ."'><a href='../user.php?pid=" . $row['pid'] . "' class='ab'>" . $row['position'] . "</td>";
  $pid = $row['pid'];
  $hours_sql = mysql_query("SELECT SUM(totaltime) as sumValue FROM pireps WHERE pid = {'$pid'} GROUP BY pid ORDER BY sumValue DESC LIMIT 5");
  while($hours = mysql_fetch_array($hours_sql)){ // Line 353 - - - - - - - - - - - - - - - - - -
  echo "<td bgcolor='". $colour ."'><a href='../user.php?pid=" . $row['pid'] . "' class='ab'>" . $hours['sumValue'] . "</td>";
  }
  echo "</tr>";
?>

 

I get the error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/.grable/vzoom/virtualzoom.net/info/roster.php on line 353

Link to comment
https://forums.phpfreaks.com/topic/88503-solved-now-i-am-confused/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.