See your code here EXTRA BRACKET on if else statement
PHP Code:
if (!$original_OsmSkiResort->hasChanged()){
echo "no change on record number ".$i.'</br>';
} // <-- closing if
} else { // <-- closing if with else
$y = $this->OsmSkiResortModel->save($OsmSkiResort) ;
echo "save: ".$y.'</br>';
}
// Should be like this
if (!$original_OsmSkiResort->hasChanged()){
echo "no change on record number ".$i.'</br>';
} else {
$y = $this->OsmSkiResortModel->save($OsmSkiResort) ;
echo "save: ".$y.'</br>';
}
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )