Welcome Guest, Not a member yet? Register   Sign In
Help! delete record doesn’t work
#1

[eluser]red apple[/eluser]
Hi everyone,

I'm new in this forum and also I'm learning to use the CI. I was able to finish an project using CI and everything works great with an little exception. Even if I try to find my error, I could not solve my probleme.

Here below you can see my model delete function:

function delete_cd($cd_id, $cd_name, $cd_type, $cd_description)
{
$data = array('cd_id'=> $cd_id, 'cd_name' => $cd_name, 'cd_type' => $cd_type, 'cd_description' => $cd_description);
if($cd_id)
{
$this->db->where('cd_id', $cd_id);
$this->db->delete('audio');
}
}

And here is my controler's function:

function delete_cd()
{
$this->load->model('Videotek');
$cd_id = $_POST['txtcd_id'];
$this->db->set('cd_id', $cd_id);
$cd_name = $_POST['txtcd_name'];
$this->db->set('cd_name', $cd_name);
$cd_type = $_POST['txtcd_type'];
$this->db->set('cd_type', $cd_type);
$cd_description = $_POST['txtcd_description'];
$this->db->set('cd_description', $cd_description);

$data['query'] = $this->Videotek->delete_cd($cd_id, $cd_name, $cd_type, $cd_description);

$data['query'] = $this->Videotek->get_info($username);
$this->load->view('vaudio', $data);
}

Thanks in advance
I realy need to solv that probleme, .... my due date for this project is tomorrow ...
Sorry for my englesh


Messages In This Thread
Help! delete record doesn’t work - by El Forum - 06-29-2008, 02:16 PM
Help! delete record doesn’t work - by El Forum - 06-30-2008, 10:25 PM
Help! delete record doesn’t work - by El Forum - 06-30-2008, 10:29 PM
Help! delete record doesn’t work - by El Forum - 07-01-2008, 06:22 PM
Help! delete record doesn’t work - by El Forum - 07-01-2008, 09:49 PM
Help! delete record doesn’t work - by El Forum - 07-02-2008, 05:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB