Getting error in Codeigniter Database for deleting
<p>I want to delete the question based on id_comprhensive which is on the other table.</p>

<p>Here is my controller</p>

<pre><code>public function delete_question($c){
    $this-&gt;load-&gt;model("admindata");
    $this-&gt;load-&gt;helper('form');
    $this-&gt;admindata-&gt;deletequestion($c);
}
</code></pre>

<p>Here is my model.</p>

<pre><code>function deletequestion($k){
        $hasil = $this-&gt;db-&gt;query("DELETE question FROM question JOIN main ON main.id_question = question.id_question WHERE main.id_comp = $k");
        $query = $hasil-&gt;result();

        return $query;
    }
</code></pre>

<p>Whenever I tried to run it, it was always error. The error is this :</p>

<p><strong>Fatal error: Call to a member function result() on boolean in C:\xampp\htdocs\2016\2016_02_15_Quiz\application\models\admindata.php on line 576</strong></p>

<p>What's wrong with my code ? I have plenty of query in admindata.php, but I just got error on this function.</p>