Daniia/Daniia.php
final public function groupBy($fields) {
      if (func_num_args()>0) {
         if (func_num_args()==1) {
            if (!is_array($fields)) {
               $fields = (array) $fields;
            }
         }else{
            $fields = func_get_args();
         }

         $this->groupBy = " GROUP BY ".implode(',',$fields);

         $this->find_first_data = $this->find_save_data = $this->find_delete_data = FALSE;
         
         $this->get_instance();
         return $this;
      }
      return null;
   }
final public function groupBy($fields) {
      if (func_num_args()>0) {
         if (func_num_args()==1) {
            if (!is_array($fields)) {
               $fields = (array) $fields;
            }
         }else{
            $fields = func_get_args();
         }

         $this->groupBy = " GROUP BY ".implode(',',$fields);

         $this->find_first_data = $this->find_save_data = $this->find_delete_data = FALSE;
         
         $this->get_instance();
         return $this;
      }
      return null;
   }
final public function groupBy ( $ fields ) { if ( func_num_args ( ) > 0 ) { if ( func_num_args ( ) == 1 ) { if ( ! is_array ( $ fields ) ) { $ fields = ( array ) $ fields ; } } else { $ fields = func_get_args ( ) ; } $ this -> groupBy = " GROUP BY " . implode ( ',' , $ fields ) ; $ this -> find_first_data = $ this -> find_save_data = $ this -> find_delete_data = FALSE ; $ this -> get_instance ( ) ; return $ this ; } return null ; }
agrega el query GROUP BY basico
@author Carlos Garcia
@param String|Array $fields
@return mixed.
agrega el query GROUP BY basico