fetchByAssoc($db->query("select no from ecmstocks where id='".$stock."'")); if($n['no']!=''){ $add=$n['no'].'/'; } $tmp= sprintf("%0".$numDigits."d",$num); return $tmp.'/'.$s.date("Y"); }