nDh4

Nomor urut

May 30th, 2012
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. $qno=("select max(substring(NO_MAT,4)) as NO_MAT FROM t_material");
  2. $nno=mysql_num_rows($qno);
  3. for($ino=0;$ino<$nno;$ino++){
  4. $fno=mysql_fetch_array($qno);
  5. }
  6. if($nno=''){
  7. $ano=1;
  8. }
  9. else{
  10. $ano=$fno[0]+1;
  11. }
  12. $notitip=sprintf('%01d',$ano);
  13. $gabno="MAT".$notitip;
Advertisement
Add Comment
Please, Sign In to add comment