ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
查询单个数据使用`find`方法: ```php //table方法如果未配置 数据库表前缀 则必须指定完整的数据表名 Db::table('oreo_user')->where('id',1)->find(); ``` 查询多个数据(数据集)使用`all`方法: ```php Db::table('oreo_user')->where('status',1)->all(); ``` 如果设置了数据表前缀参数的话,可以使用 ```php Db::table('user')->where('id',1)->find(); Db::table('user')->where('status',1)->all(); ``` 当然数据库操作的过程中我们已经提供了参数绑定,但你也可以手动操作参数绑定 ```php Db::table('oreo_user')->where('id=:id')->bind(':id','1')->find(); ```