-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
From_form update affects all records #291
Comments
Did you pass the id of the row? The primary key... |
Yes, I did.
$id is passed to the controller function as the third segment. In my 'gemeenten_model':
I checked the query that is generated by the model, with $this->db->last_query(). The outcome of that is: So no sign of the primary key here. |
change below line: |
No, this doesn't work either. Creating a record with the from_form method works flawlessly, but if I update one record, all records in the table are affected, i.e. they become identical to the one that I wanted to update. |
I've setup a model based on MY_Model to insert and update records from form. Inserting a new record works fine, but when I want to update a record, all field values from the form are written to all records in the table. I went throught the model code, the controller and the view several times, but I can't find where I'm doing something wrong. Can you help me fix this?
The text was updated successfully, but these errors were encountered: