I have a function written to delete entries from a table called stack. I have written similar function for other tables and it works. For this its not working, but no errors too. How can i find out whts wrong?
Controller entry:
function delete_tag($id)
{
$this->Mrestaurant->delete_tag($id);
echo 'deleted!';
}
Model Entry:
function delete_tag($id)
{
$this->db->where('id', '$id');
$this->db->delete('stack');
}
Database and all i have preloaded:
$this->load->database();
$this->load->model('Mdb','',TRUE);
Every other db functions are working like adding, updating, deleting other datas etc... I'm confused because there is no error. And I don't know how to find out whats wrong.
Update This worked in model
$this->db->delete('stack', array('id' => $id));
Any idea why?