Hi again, I’m coding a model for a user database and I’m using active record for insert.
In the model documentation you can find this code:
class Blogmodel extends Model {
var $title = '';
var $content = '';
var $date = '';
function insert_entry()
{
$this->title = $_POST['title'];
$this->content = $_POST['content'];
$this->date = time();
$this->db->insert('entries', $this);
}
}
It uses the object variables ($this) for the insert, but when I try in my own model I get this error:
An Error Was Encountered
Error Number: 1054
Unknown column '_parent_name' in 'field list'
INSERT INTO users (login, user_name, since, password, question, answer, user_status, remind, _parent_name, _ci_scaffolding, _ci_scaff_table) VALUES ('john@doe.com', 'johndoe', '2006-11-01 20:22:46', '621f11f70193417445dfe0581ed16ee270a6dff9', 'test word', '717bdea6ed86abaef6f4257a948b1b98e882a474', 'A', 'I', 'Users_model', 0, 0)
I see that there are 3 internal variables of Model in the insert (_parent_name, _ci_scaffolding, _ci_scaff_table), so either the doc is wrong or there is a bug.
Thank you.
