Welcome Guest, Not a member yet? Register   Sign In
using active record
#3

[eluser]JoostV[/eluser]
You could also return the insert ID, which is more useful info than the SQL

Code:
public function insert ($data){
    $this->db->insert('mytable', $data);
    return $this->db->insert_id();
}


Messages In This Thread
using active record - by El Forum - 03-10-2011, 10:48 PM
using active record - by El Forum - 03-10-2011, 11:48 PM
using active record - by El Forum - 03-11-2011, 04:23 AM
using active record - by El Forum - 03-11-2011, 06:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB