摘要:
1.1.1 查询所有数据 $selData = DB::table('article')->get(); 1.1.2 单条件查询 #DB::table('表名')->where('字段','表达式','数据')->get(); $selData = DB::table('article')->whe 阅读全文
摘要:
将数据拼装成如下格式 id 奖品(prize) 概率(rate) 数量(num) 已抽数量(prize_num) 1 一等奖 10% 10 0 2 二等奖 15% 20 0 3 三等奖 35% 50 0 根据如上实现抽奖如下($prizes表示上面表格数据) public function prom 阅读全文