Correcting teacher:PHPz
Correction status:qualified
Teacher's comments:
在database里面配置
$user = Db::table('oyk_user')->find();
$user =Db::table('oyk_user')->where('nickname','小编6')->find();
$user = Db::table('oyk_user')->where('uid','>','6')->select();
$user = Db::table('oyk_user')->where('uid','=','6')->value('nickname');
$data = [
'nickname' => '小编7',
'phone' => '18822226666'
];
$add = Db::table('oyk_user')->insert($data);
$data = [
'nickname' => '小编9',
'phone' => 18822228888
];
$update = Db::table('oyk_user')->where('uid',16)->update($data);
自增 inc ,自减 dec 用在访问日志上
$update = Db::table('oyk_user')->where('uid',16)->inc('log_num',10)->update();
$delete = Db::table('oyk_user')->where('uid',16)->delete();
useSoftDelete
$delete = Db::table('oyk_user')->where('uid',15)->useSoftDelete('status',99)->delete();