Nette\Database\Table\Selection::count PHP Метод

count() публичный Метод

Counts number of rows.
public count ( $column = NULL ) : integer
Результат integer
    public function count($column = NULL)
    {
        if (!$column) {
            $this->execute();
            return count($this->data);
        }
        return $this->aggregation("COUNT({$column})");
    }

Usage Example

Пример #1
0
 /**
  * @return int
  */
 public function getCount()
 {
     if ($this->count === NULL) {
         $column = !$this->source->getPrimary(FALSE) ? '*' : $this->source->getPrimary();
         $this->count = $this->source->count($column);
     }
     return $this->count;
 }
All Usage Examples Of Nette\Database\Table\Selection::count