09-01-2010, 05:48 AM
[eluser]Bionicjoe[/eluser]
I changed something awhile back & I guess I didn't test it. Now I can't fix whatever I changed?
Trying to insert a record.
I get error
NOTE: If I uncomment the redirect I'll see the error & the page redirects quickly with the update inserted into the DB. But why the error?
Model
I changed something awhile back & I guess I didn't test it. Now I can't fix whatever I changed?
Trying to insert a record.
I get error
Quote:Message: Undefined index: addupdate
Filename: controllers/outage.php
NOTE: If I uncomment the redirect I'll see the error & the page redirects quickly with the update inserted into the DB. But why the error?
Code:
function addupdate() {
//Submit an update to the 'UPDATES' table.
$id = $this->uri->segment(3);
$this->load->model('outage_model','',TRUE);
$this->outage_model->addupdate($_POST['addupdate'], $_POST);
$link = array('outage/editoutage', $_POST['outageid']);
//redirect($link,'refresh');
}
Model
Code:
function addupdate($id, $data)
// Update one outage record
{
$this->db->where('outageid', $id);
$this->db->insert('updates', $data);
}