phalcon orm model

 

查询列表

return User::query()
    ->where("app_id = {$app_id}")
    ->execute()->toArray();

  

查询单条

return User::findFirst([
   "app_id = {$app_id}",
])->toArray();

  

orderBy

->orderBy("id desc")

  

andWhere

orWhere

->andWhere("muid = :muid: or oaid > :oaid:",
    [
        "muid" => $muid,
        "oaid"   => $oaid,
    ])

  

whereIn

->whereIn('status', [1,2])

  

 

 

文档:https://www.kancloud.cn/taobaby365/phalcon/100044

posted @ 2020-09-08 10:28  程序生(Codey)  阅读(318)  评论(0编辑  收藏  举报