Jump to content

whats wrong here !!!!!!!


webtuto

Recommended Posts

hi

whats the error here =>

 

$web="SELECT SUM(`rate`) / COUNT(`rate`) from `rate`";
$tuto=mysql_query($web) or die('Database error: ' . mysql_error());
$mas=mysql_fetch_array($tuto);
echo"The Rating of this tutorial is : ".$mas['rate']."<br><br>";

 

it douesnt show the result :s

 

 

I usually use and alias such as SELECT SUM(`rate`) AS rate_avg

Link to comment
https://forums.phpfreaks.com/topic/85411-whats-wrong-here/#findComment-435777
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.