Skip to content

Commit e08607d

Browse files
committed
Upgrade Custom Base Model
1 parent c2c524c commit e08607d

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

hungng/HungNG_Custom_Based_model.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,6 +1025,36 @@ public function count_all_from_table()
10251025
return $this->db->count_all($this->tableName);
10261026
}
10271027

1028+
/**
1029+
* Function count_all_by_wheres
1030+
*
1031+
* @param $wheres
1032+
*
1033+
* @return int
1034+
* @author : 713uk13m <dev@nguyenanhung.com>
1035+
* @copyright: 713uk13m <dev@nguyenanhung.com>
1036+
* @time : 27/03/2023 04:52
1037+
*/
1038+
public function count_all_by_wheres($wheres)
1039+
{
1040+
return $this->prepare_wheres_statement($wheres)->count_all_results($this->tableName);
1041+
}
1042+
1043+
/**
1044+
* Function count_all_by_not_wheres
1045+
*
1046+
* @param $wheres
1047+
*
1048+
* @return int
1049+
* @author : 713uk13m <dev@nguyenanhung.com>
1050+
* @copyright: 713uk13m <dev@nguyenanhung.com>
1051+
* @time : 27/03/2023 05:47
1052+
*/
1053+
public function count_all_by_not_wheres($wheres)
1054+
{
1055+
return $this->prepare_wheres_not_statement($wheres)->count_all_results($this->tableName);
1056+
}
1057+
10281058
/**
10291059
* Function get_list_distinct
10301060
*

0 commit comments

Comments
 (0)