🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
## 删除数据 ~~~ // 条件删除 Db::name('user')->where('id',1)->delete(); Db::name('user')->where('id','<',10)->delete(); ~~~ 最终生成的SQL语句可能是: ~~~ DELETE FROM `og_user` WHERE `id` = 1 DELETE FROM `og_user` WHERE `id` < 10 ~~~ >也可以在最后加删除条件: ~~~ Db::name('user')->where('id','<',10)->delete(['addtime' => 1520]); ~~~ 实际生成的SQL语句可能是: ~~~ DELETE FROM `og_user` WHERE `id` < 10 AND `iaddtime` =1520 ~~~