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`

$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`