I have thousand of data from an webservice . but nusoap limit execution time only 30 second . I can't insert all those data because of this limit . I can't change nusoap setting because is on server . . is there anyway to fix that ? . EDIT 1 i tried split big data to array chunk, but after 30 second is over here's my code (using code igniter)
$this->db->trans_start();
$_datas = array_chunk($data["result"], 300);
foreach ($_datas as $key => $data) {
$insert=$this->db->insert_batch('temp_mahasiswa', $data);
if (!$insert && $this->db->error()) {
//some logics here, you may create some string here to alert user
echo "Data nim"; echo " "; echo $key['nipd'] ; echo " "; echo "Sudah Ada"; echo '<br>';
}else {
//other logics here
echo "Data nim"; echo " "; echo $key['nipd'] ; echo " "; echo "Sudah Masuk"; echo '<br>';
}
}
$this->db->update('temp_mahasiswa',$tambah);
$this->db->trans_complete();