77 lines
2.2 KiB
PHP
77 lines
2.2 KiB
PHP
<?php
|
|
|
|
class Updatequeryregional extends MY_Controller
|
|
{
|
|
|
|
function donow(){
|
|
$array_db = array(
|
|
'reg_bandung',
|
|
'reg_tegal',
|
|
'reg_manado',
|
|
'reg_pontianak',
|
|
'reg_surabaya',
|
|
'reg_yogya',
|
|
'reg_jakarta',
|
|
'reg_cirebon',
|
|
'reg_palembang',
|
|
'reg_medan',
|
|
'reg_padang',
|
|
'reg_pekanbaru',
|
|
'reg_magelang',
|
|
'reg_salatiga',
|
|
'reg_semarang',
|
|
'reg_balikpapan',
|
|
'reg_madiun',
|
|
'reg_makasar',
|
|
'reg_denpasar',
|
|
'reg_tasik',
|
|
'reg_prospek',
|
|
'reg_sima_malang',
|
|
'reg_sima_kediri',
|
|
'reg_sima_jember'
|
|
);
|
|
foreach($array_db as $k => $v){
|
|
$this->dbx = $this->load->database($v, true);
|
|
|
|
/*$sql = "UPDATE s_menu SET S_MenuUrl = 'test/vuex/one-sample-storage-destroy-v2/'
|
|
WHERE
|
|
`S_MenuName` = 'TPS'";yamin error*/
|
|
//begin update preparasi sperma sbmnya, re = 18, rever = 16, reval = 16
|
|
/*$sql = "UPDATE s_menu SET S_MenuUrl = 'test/vuex/one-process-resultentry-v19/'
|
|
WHERE
|
|
`S_MenuName` = 'Result Entry'";
|
|
$query = $this->dbx->query($sql);*/
|
|
/*$sql = "UPDATE s_menu SET S_MenuUrl = 'test/vuex/one-process-resultverification-v20/'
|
|
WHERE
|
|
`S_MenuName` = 'Result Verification'";
|
|
$query = $this->dbx->query($sql);
|
|
$sql = "UPDATE s_menu SET S_MenuUrl = 'test/vuex/one-process-resultvalidation-v18/'
|
|
WHERE
|
|
`S_MenuName` = 'Result Validation'";
|
|
$query = $this->dbx->query($sql);*/
|
|
//end update preparasi sperma
|
|
/*$sql = "ALTER TABLE `t_samplestoragedestroy`
|
|
CHANGE `T_SampleStorageDestroySampleWeight` `T_SampleStorageDestroySampleWeight` float(11,2)
|
|
NOT NULL AFTER `T_SampleStorageDestroyFlagEmpty`";*/
|
|
/*$sql = "ALTER TABLE `t_samplestoragedestroy_detailnonsample`
|
|
CHANGE `T_SampleStorageDestroyDetailNonSampleWeight` `T_SampleStorageDestroyDetailNonSampleWeight` float(11,2)
|
|
NOT NULL AFTER `T_SampleStorageDestroyDetailNonSampleT_SampleStorageDestroyID`";*/
|
|
/*$sql = " UPDATE `lcprep_interpretasi` SET `Lcprep_InterpretasiCode` = '4203' WHERE `Lcprep_InterpretasiID` = '18';
|
|
UPDATE `lcprep_interpretasi` SET `Lcprep_InterpretasiCode` = '4202' WHERE `Lcprep_InterpretasiID` = '39';*/
|
|
|
|
$query = $this->dbx->query($sql);
|
|
if ($query) {
|
|
//$rows = $query->row()->xcount;
|
|
echo $v."-OK ";
|
|
}
|
|
else{
|
|
echo $v."-ERROR ";
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
?>
|