title: Display result to table using sql arithmetic query
body: <p>I want to display the result to table using this code</p>
  
  <pre><code>$q = $_GET['q'];
  mysqli_select_db($con,"ofes");
  $sql="SELECT * FROM tbl_summative_results WHERE subject_description = '".$q."'";
  $result = mysqli_query($con,$sql);
  
  $sql1="SELECT (round(AVG(pr1+pr2+pr3+pr4+pr5+pr6+pr7+pr8+pr9)/9,2)) FROM tbl_summative_results WHERE subject_description = '".$q."'";
  $results = mysqli_query($con,$sql1);
  while($row = mysqli_fetch_array($results)) {
      echo "&lt;tr&gt;";
      echo "&lt;td style='background-color:#e9efc4;color:black;font-weight:bold'&gt;" . $row['(round(AVG(pr1+pr2+pr3+pr4+pr5+pr6+pr7+pr8+pr9)/9,2))'] . "&lt;/td&gt;";
      echo "&lt;/tr&gt;";
       mysqli_close($con);
  }
  </code></pre>
  
  <p>When I run the code I always have an error.</p>