How can I use findAll with select in model? |
-
nurmyrat Newbie

-
Posts: 9
Threads: 2
Joined: Aug 2017
Reputation:
0
find()
Returns a single row where the primary key matches the value passed in as the first parameter:
$user = $userModel->find($user_id);
The value is returned in the format specified in $returnType.
You can specify more than one row to return by passing an array of primaryKey values instead of just one:
$users = $userModel->find([1,2,3]);
If no parameters are passed in, will return all rows in that model’s table, effectively acting like findAll(), though less explicit.
Please read the docs.
|
Messages In This Thread |
RE: How can I use findAll with select in model? - by nurmyrat - 04-08-2021, 12:07 AM
|