[eluser]Bionicjoe[/eluser]
I did this.
Code:
function updateoutage()
//Submit the updated outage data to the DB.
{
$this->load->model('outage_model','',TRUE);
if (is_array($_POST))
{
foreach ($_POST['servicename'] as $data)
{
$_POST['servicename'] = $data['servicename'];
}
foreach ($_POST['location'] as $data)
{
$_POST['location'] = $data['location'];
}
}
But it dumps out these values.
Code:
UPDATE `outage` SET `outageid` = '1', ...blah... `servicename` = 'V', `location` = 'L', ...
Values should be Video & Lexington, so it's using the first char as an index. I've done this before, but can't remember how I fixed it.
(Plus I got this error: Duplicate entry '1' for key 'PRIMARY'...grrr SQL)