[eluser]whygod[/eluser]
In MY_model,
Code:
function add_group() {
$data = array(
'name' => 'dentist' ,
'description' => 'dentist' ,
);
$this->db->insert('groups', $data);
if($this->db->affected_rows() > 0)
{
echo 'Data saved.';
}
else
{
echo 'Data not saved.';
}
}
In my controller:
Code:
function add_group() {
$this->dental_model->add_group();
}
The problem here it doesn't insert the record.
When I execute this it says it saved the data successfully.
But when I checked if it really saved I don't see the newly inserted data.
Why?
Thank you very much in advanced.