title: Call to undefined method CodeIgniter\Database\MySQLi\Builder:: find()
body: <p>I'm making CRUD, with upload a file (image), but when I want to use unlink to delete the file I got an error, here's below.</p>
  <p>Codeigniter4 error: Call to undefined method CodeIgniter\Database\MySQLi\Builder:: find()</p>
  <p>This is the codes I used to try to delete the image file. From controller connect to model.</p>
  <p><a href="https://i.stack.imgur.com/YN0no.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YN0no.jpg" alt="enter image description here" /></a></p>
  <pre><code>The controller:
  
      public function delete()
          {
              $model = new Datatablesmodal();
              $id = $this-&gt;request-&gt;getPost('product_id');
              $model-&gt;deleteProduct($id);
              return redirect()-&gt;to('/modalboot');
          }
      
      The modal:
      public function deleteProduct($id)
          {
              
              $foto=$this-&gt;db-&gt;table(&quot;formulir_pendaftaran&quot;)-&gt;find(array('product_id' =&gt; $id)); (line 1)
              unlink('/pasfoto/'.$foto['pas_foto']); (line 2)
              $this-&gt;db-&gt;table('formulir_pendaftaran')-&gt;delete(array('product_id' =&gt; $id));
              return $query;
          } 
  </code></pre>
  <p>The id of the table is product_id, if I deleted line 1 and 2 I can delete the data from the table but not the image file it's still in my directory, if I used line 1 and 2 to delete the file I can't because there is an error.</p>