mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 09:52:22 +00:00
- Added method addGroupBy to DB_Model
- Changed the query present in method getPrestudentMultiAssign of Prestudent_model
This commit is contained in:
@@ -468,6 +468,26 @@ class DB_Model extends FHC_Model
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------------------
|
||||
* Add one or more fields in the group by clause
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addGroupBy($fields)
|
||||
{
|
||||
if (!isset($fields)
|
||||
|| (!is_array($fields) && !is_string($fields))
|
||||
|| (is_array($fields) && count($fields) == 0)
|
||||
|| (is_string($fields) && $fields == ''))
|
||||
{
|
||||
return error(FHC_MODEL_ERROR, FHC_MODEL_ERROR);
|
||||
}
|
||||
|
||||
$this->db->group_by($fields);
|
||||
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------------------
|
||||
* Reset the query builder state
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user