[eluser]Zeff[/eluser]
No solution yet ...
So I choose the following workaround: (maybe it can help others :-))
Code:
$sql ="SELECT * WHERE `uid` ='" . $uid . "'";
where the uid field is my primary key field.
Now with the following code, I handle duplicate key problems:
Code:
if($this->db->simple_query($sql)){
if($this->db->insert('accounts', $data)){
$this->data["content"] = "<div class='ok'>Record successfully added...</div>";
}else{
$this->data["content"] = "<div class='error'>Insert of new record failed!</div>";
}
}else{
$this->data["content"] = "<div class='error'>Record already exists.</div>";
}
I do not use a model here, since I just use simple native active record functions...