【问题标题】:Using 'and' with Kohana Jelly在 Kohana Jelly 中使用“和”
【发布时间】:2010-09-22 15:59:39
【问题描述】:

我正在计算数据库中有多少行匹配两个条件

$rows = Jelly::select('brief')->where('creator_id', '=', $this->view->user->id, 'and', 'name', '=', $name)->count();

我很久以前就做过这个,但忘记了如何做。我想知道这是否是正确的做法。

我似乎无法通过 Google 找到答案。

【问题讨论】:

    标签: php kohana jelly


    【解决方案1】:
    $rows = Jelly::select('brief')->where('creator_id', '=', $this->view->user->id )->where('name', '=', $name)->count();
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-07
      • 2012-07-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多