PHP Indonesia - Facebook | PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ | |
 | What drives your body?
Explore your exercise, sleep and food data to discover your body on projectaddapp  | From our sponsors | | |
$qry = "SELECT CAST(MAX(SUBSTR(no_resep,11,3)) AS ... Sep 24th 2013, 14:16, by Benny Prasetiyo | $qry = "SELECT CAST(MAX(SUBSTR(no_resep,11,3)) AS UNSIGNED) AS kode FROM t_resep_pasien"; $no_resep = $this->model_list->getFreeSql($qry); foreach($no_resep as $noresep) { if($noresep['kode']==NULL) { $this->o['no_resep'] = 'RSPP'.(string)date('ymd').'001'; }else{ $no_resep = (int)$noresep['kode']+1; $jmlstr = strlen((string)$no_resep); if($jmlstr==1) { $this->o['no_resep'] = '00'.$no_resep; }else if($jmlstr==2){ $this->o['no_resep'] = '0'.$no_resep; }else if($jmlstr==3) { $this->o['no_resep'] = $no_resep; } $this->o['no_resep'] = 'RSPP'.(string)date('ymd').$no_resep; } } Menurut agan2 script ane ini kurangnya dmn ya? ane pengen bikin no_resep yg hasilnya ntar kayak gini: RSPP130924001 RSPP: kode, 13=tahun, 09=bulan, 24=tanggal,001= no urut | | |
|
Tidak ada komentar:
Posting Komentar