title: Codeigniter Call to undefined method CI_DB_mysqli_result::fetch_assoc()
body: <p>hello i want to update the row by clicking on edit button, but it giving me this error, kindly help</p>
  <pre><code>function updateUser()
  {
      $data = stripslashes(file_get_contents(&quot;php://input&quot;));
      $mydata = json_decode($data, true);
      $id = $mydata['sid'];
      //retrieve specific info 
      $sql = &quot;SELECT * FROM admin WHERE id = {$id}&quot;;
      $result = $this-&gt;db-&gt;query($sql); 
      $row = $result-&gt;fetch_assoc();
      echo json_encode($row); //returning json formate
  }
  </code></pre>