Welcome Guest, Not a member yet? Register   Sign In
Datamapper delete function not working
#1

[eluser]Unknown[/eluser]
Hi all,
I just started to use CI and got stucked with my first problem. I'm using the Datamapper for my database handling but the delete function is not working.

The object is created successfully, i can echo my row content and it appears on the site. But the delete function does nothing. Here is my Controller where I use this delete function:

Code:
public function delete(){
        $carrier = new Carrier_m();
        $carrier->where("carrier_dfn_id",$_POST["carrier_dfn_id"])->get();
        $carrier->delete();
        echo $carrier->check_last_query();
        $this->session->set_flashdata('message','Carrier successfully deleted!');
        #redirect('Carrier/index');
}

The last query check shows only this:

Code:
SELECT *
FROM (`carrier_dfn`)
WHERE `carrier_dfn`.`carrier_dfn_id` = '34'

Seems for me that the delete function is called but does nothing ;(

Does someone see the error?

Thanks

Cheers




Theme © iAndrew 2016 - Forum software by © MyBB