I want to show the total rating of each company and total will put on specific category
the code is this
if (isset($_POST['search'])){
$key = $_POST['keyword'];
$com = mysql_query("
SELECT *
FROM company
WHERE id LIKE '%$key%'
OR name LIKE '%$key%'
OR address LIKE '%$key%'
OR city LIKE '%$key%'
OR province LIKE '%$key%'
OR region LIKE '%$key%'
OR country LIKE '%$key%'
OR description LIKE '%$key%'
");
while($comshow = mysql_fetch_array($com)){
$comshowid = $comshow['id'];
echo '
<form method="POST">
<div class = "row">
<div class = "text-right">
<b><input name = "reviewid" style = "margin-right:50%;" class = "text-right" id = "id" type = "text" value = "'.$comshow['id'].'" readonly></b>
</div>
</div>
<div class = "row" style = "margin-left:1%;">
<div class ="col-md-4">
<img src = "'.$comshow['dp'].'" style = "width:80%;">
</div>
<div class = "col-md-6">
<h2><i>'.$comshow['name'].'</i></h2>
<hr />
<p>'.$comshow['description'].'</p>
<h4><b>Ratings</b></h4>
<p>Recruitment:</p>
<p>Tenure:</p>
<p>Separation:</p>
<input class = "btn btn-info" type = "submit" name ="review" value = "REVIEW">
</div>
</div><br><br></form>
';
}