I wrote a simple function to delete data from the database, but the delete request does not fit my code for the model as follows:
function removedata()
{
$userid = $this->input->post('userid');
$this->db->where('userid',$userid);
$deldata=$this->db->delete('userbasic');
if($deldata==true)
{
echo "Data Removed Successfully";
}
else
{
echo "Deletion Failed";
}
I already downloaded the database and tried as a request, i.e.
$this->db->where('userid',$userid);
$deldata=$this->db->delete('userbasic');
and
$deldata=$this->db->delete('userbasic',array('userid'=>$userid));
Therefore, please offer me to answer that there is no error as a result, it also successfully deletes data, but still the data is not deleted from the database ...
source
share