Example #1
0
 /**
  * Returns a list of distinct document types for the given constraint set.
  *
  * @return array
  */
 public function groupedTypesPlusCount()
 {
     $this->select->reset('columns');
     $this->select->columns(array("type" => "type", "count" => "count(DISTINCT id)"));
     $this->select->group('type');
     return $this->db->fetchAssoc($this->select);
 }