id.'" ORDER BY id DESC';
//$rate_result=mysql_query($rate_q) or die(mysql_error());
//$total_num_rates=mysql_num_rows($rate_result);
//$total_rating_points=$total_num_rates;
$star1="";$star2="";$star3="";$star4="";$star5="";
$j=0;
$k=1;
while($reviews_data=mysql_fetch_object($review_result)){
//$rate_q='SELECT * FROM ind_ratebusiness WHERE companyId="'.$reviews_data->companyId.'" ORDER BY id DESC limit '.$j.','.$k.'';
//$rate_result=mysql_query($rate_q) or die(mysql_error());
//$num_rate=mysql_num_rows($rate_result);
//$rate_data=mysql_fetch_object($rate_result);
//$rating=$reviews_data->rating;
//$rating=$reviews_data->rating;
switch ($reviews_data->rating)
{
case 1:
$star1=$star1+1;
break;
case 2:
$star2=$star2+1;
break;
case 3:
$star3=$star3+1;
break;
case 4:
$star4=$star4+1;
break;
case 5:
$star5=$star5+1;
break;
}
$j++;
}
########################
$numDivLines = 0;
$maxValue = $star1;
if($star2>$maxValue){
$maxValue = $star2;
}
if($star3>$maxValue){
$maxValue = $star3;
}
if($star4>$maxValue){
$maxValue = $star4;
}
if($star5>$maxValue){
$maxValue = $star5;
}
if($maxValue == 1 || $maxValue == 2 || $maxValue == 3 || $maxValue == 4){
$numDivLines = $maxValue-1;
}else{
$numDivLines = 5;
}
##########################
$graph1="
0){ ?> No Result Found. |