title: Edit and Delete action with Codeigniter
body: <p>i want to update and delete an entry im really new at this and i dont know where to put the function..so yeah i need help</p>
  
  <p>controller</p>
  
  <pre><code>function delete()
  {
      $this-&gt;site_model-&gt;delete_row('booking');
      $this-&gt;view();
  }
  }
  </code></pre>
  
  <p>site_model</p>
  
  <pre><code>function delete_row()
  {
      $this-&gt;db-&gt;where('id', $this-&gt;uri-&gt;segment(3));
      $this-&gt;db-&gt;delete('booking');
  }
  </code></pre>
  
  <p>and my view</p>
  
  <pre><code>&lt;?php 
  $this-&gt;table-&gt;set_heading("Name","Nationality","Number of Guest","Date","Package","Other      Request","Delete Record");
  $qry = $this-&gt;db-&gt;get('booking');
  foreach ($qry-&gt;result() as $row) {
  $this-&gt;table-&gt;add_row($row-&gt;name,$row-&gt;nationality,$row-&gt;number_of_guest,$row-&gt;date,$row-&gt;package,$row-&gt;request);
  
  }
  echo $this-&gt;table-&gt;generate();
  
   ?&gt;
  </code></pre>
  
  <p>TIA, im really new at this so please consider this..</p>