- Remove parameters "new" after checked it in method postPrestudentstatus of controller Prestudentstatus

- Method insert of DB_Model doesn't use anymore insert_id() from CI because it forces to have a sequence
  and doesn't return the primary key when it's composed by more columns
This commit is contained in:
paolo
2016-05-24 15:04:35 +02:00
parent 4f8826dc3f
commit e76e1af15c
2 changed files with 18 additions and 1 deletions
@@ -61,6 +61,9 @@ class Prestudentstatus extends APIv1_Controller
{
if(isset($prestudentstatus['new']) && $prestudentstatus['new'] == true)
{
// Remove new parameter to avoid DB insert errors
unset($prestudentstatus['new']);
$result = $this->PrestudentstatusModel->insert($prestudentstatus);
}
else