• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I use findAll with select in model?

#3
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.
Reply


Messages In This Thread
RE: How can I use findAll with select in model? - by nurmyrat - 04-08-2021, 12:07 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.