コード例 #1
0
ファイル: database.php プロジェクト: nsystem1/ZeeJong
 public function countYellowTwoCards()
 {
     $sel = new \Selector('Cards');
     $sel->filter([['color', '=', 3]]);
     $sel->count();
     $result = $this->select($sel);
     if (count($result) != 1) {
         throw new exception('Error while counting cards');
     }
     return $result[0]['COUNT(*)'];
 }