public function getCode(){
do{
$code = rand_string(12, 1);
$repeat_code = $this->find(array('where' => array('code' => $code)));
}while(!empty($repeat_code));
return $code;
}
PHP 生成随机多位序号 查询数据库
最新推荐文章于 2021-11-02 17:07:46 发布