[eluser]LuckyFella73[/eluser]
In your edit form you need a hidden form field
and set the value equal to the id of the record
you are editing.
When calling the update method (after submitting the form)
you need a line like:
Code:
$tables['id'] = $this->input->post('row_id');
// assuming your hidden field has the name "row_id" in this example
Otherwise your model doesn't know which row has to be updated.
If you modify your script like that the update method from your model
should work like you tried inbetween and samitrimal suggested:
Code:
function update($tables){
$this->db->where('id', $this->uri->segment(3));
$this->db->update('data', $tables);
}