4 Replies Latest reply on Nov 6, 2008 8:20 AM by Newsgroup_User

    A Little help with Code needed

    newchickinCF
      I have alittle PHP snippet in a While loop and i am getting into problems while converting it

      $sql = "select rating from r_ratings where iid = $iid";

      $result3 = mysql_query($sql ,$db);

      if ($myrow2 = mysql_fetch_array($result3)) {

      do {
      $ratetotal = $ratetotal + $myrow2["rating"];
      $ratecount++;
      } while ($myrow2 = mysql_fetch_array($result3));

      }

      $newrate = $ratetotal / $ratecount;