Skip to content

Commit 6e2603b

Browse files
authored
Merge pull request #27 from nguyenanhung/v3.2.0-develop
V3.2.0 develop
2 parents c2c524c + 81824e2 commit 6e2603b

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

hungng/HungNG_Custom_Based_model.php

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,21 @@ public function prepare_wheres_statement($wheres)
469469
return $this->db;
470470
}
471471

472+
/**
473+
* Function apply_wheres
474+
*
475+
* @param $wheres
476+
*
477+
* @return bool|\CI_DB_query_builder|object
478+
* @author : 713uk13m <dev@nguyenanhung.com>
479+
* @copyright: 713uk13m <dev@nguyenanhung.com>
480+
* @time : 27/03/2023 07:52
481+
*/
482+
public function apply_wheres($wheres)
483+
{
484+
return $this->prepare_wheres_statement($wheres);
485+
}
486+
472487
/**
473488
* Function prepare_wheres_not_statement
474489
*
@@ -502,6 +517,21 @@ public function prepare_wheres_not_statement($wheres)
502517
return $this->db;
503518
}
504519

520+
/**
521+
* Function apply_not_wheres
522+
*
523+
* @param $wheres
524+
*
525+
* @return bool|\CI_DB_query_builder|object
526+
* @author : 713uk13m <dev@nguyenanhung.com>
527+
* @copyright: 713uk13m <dev@nguyenanhung.com>
528+
* @time : 27/03/2023 08:21
529+
*/
530+
public function apply_not_wheres($wheres)
531+
{
532+
return $this->prepare_wheres_not_statement($wheres);
533+
}
534+
505535
/**
506536
* Function only_status_is_active
507537
*
@@ -1025,6 +1055,36 @@ public function count_all_from_table()
10251055
return $this->db->count_all($this->tableName);
10261056
}
10271057

1058+
/**
1059+
* Function count_all_by_wheres
1060+
*
1061+
* @param $wheres
1062+
*
1063+
* @return int
1064+
* @author : 713uk13m <dev@nguyenanhung.com>
1065+
* @copyright: 713uk13m <dev@nguyenanhung.com>
1066+
* @time : 27/03/2023 04:52
1067+
*/
1068+
public function count_all_by_wheres($wheres)
1069+
{
1070+
return $this->prepare_wheres_statement($wheres)->count_all_results($this->tableName);
1071+
}
1072+
1073+
/**
1074+
* Function count_all_by_not_wheres
1075+
*
1076+
* @param $wheres
1077+
*
1078+
* @return int
1079+
* @author : 713uk13m <dev@nguyenanhung.com>
1080+
* @copyright: 713uk13m <dev@nguyenanhung.com>
1081+
* @time : 27/03/2023 05:47
1082+
*/
1083+
public function count_all_by_not_wheres($wheres)
1084+
{
1085+
return $this->prepare_wheres_not_statement($wheres)->count_all_results($this->tableName);
1086+
}
1087+
10281088
/**
10291089
* Function get_list_distinct
10301090
*

0 commit comments

Comments
 (0)