ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
selectBy方法以某字段为条件查询多条数据。 ~~~ $model->selectBy('category',1); // 查询category为1的数据 ~~~ 执行的SQL语句:`select * from table where category=1` 你还可以这样用: ~~~ $model->selectByCategory(5); // 查询category为5的数据 ~~~ 执行的SQL语句:`select * from table where category=5`