标签:blog ar div log ad ef as tt br
#str_pad 补位
$sn = ‘SN‘.str_pad($goods_id, 8, ‘0‘, ‘LEFT‘); $this->where(‘id=‘.$goods_id)->save(array( ‘goods_sn‘=>$sn, ));
生成商品的唯一货号
原文地址:http://www.cnblogs.com/hgj123/p/4167270.html