title: codeigniter db->delete() returns true always?
body: <p>i have displayed table with record and "Delete" image. on delete image click i am deleting the record using ajax. supose there are three records with id 40,41,42
  if i delete record with ID = 40, responce returns "1" and record gets deleted,
  next time if i again click on delete image it again returns "1".</p>
  
  <p>codeigniters db->delete() method returns "1" always ?
  do i need to check manually if record exists and then proceed to delete ?
  below is my code iin ajax.php</p>
  
  <pre><code>$res = $this-&gt;db-&gt;delete(tbl_user_groups, array('owner_id' =&gt; $admin,'user_group_id'=&gt;$gid)); 
  
  if($res) echo json_encode (array("success"=&gt;"true"));
  else     echo json_encode (array("success"=&gt;"false"));
  </code></pre>