语法
Db::table(表名)->where(条件)->select();
示例
Db::table(‘think_user‘)->where(‘type=1 AND status=1‘)->select();
预处理机制
Db::table(‘think_user‘)->where("id=:id and username=:name") ->bind([‘id‘=>[1,\PDO::PARAM_INT],‘name‘=>‘thinkphp‘]) ->select();
时间: 2024-12-20 10:06:03