06-29-2008, 02:16 PM
[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
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