Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //range 2018
- function januari($id_mhs){
- $this->db->select('count(*) as tgl');
- $this->db->where('tgl_pembayaran >=', '2018-01-01');
- $this->db->where('tgl_pembayaran <=', '2018-01-31');
- $this->db->where('id_mhs',$id_mhs);
- $bln1=$this->db->get('pembayaran');
- foreach ($bln1->result() as $januari1) {
- return $januari1->tgl;
- }
- }
- function februari($id_mhs){
- $this->db->select('count(*) as tgl');
- $this->db->where('tgl_pembayaran >=', '2018-02-01');
- $this->db->where('tgl_pembayaran <=', '2018-02-31');
- $this->db->where('id_mhs',$id_mhs);
- $bln=$this->db->get('pembayaran')->result();
- foreach ($bln as $key) {
- return $key->tgl;
- }
- }
- function maret($id_mhs){
- $this->db->select('count(*) as tgl');
- $this->db->where('tgl_pembayaran >=', '2018-03-01');
- $this->db->where('tgl_pembayaran <=', '2018-03-31');
- $this->db->where('id_mhs',$id_mhs);
- $bln=$this->db->get('pembayaran')->result();
- foreach ($bln as $key) {
- return $key->tgl;
- }
- }
- function april($id_mhs){
- $this->db->select('count(*) as tgl');
- $this->db->where('tgl_pembayaran >=', '2018-04-01');
- $this->db->where('tgl_pembayaran <=', '2018-04-31');
- $this->db->where('id_mhs',$id_mhs);
- $bln=$this->db->get('pembayaran')->result();
- foreach ($bln as $key) {
- return $key->tgl;
- }
- }
- function mei($id_mhs){
- $this->db->select('count(*) as tgl');
- $this->db->where('tgl_pembayaran >=', '2018-05-01');
- $this->db->where('tgl_pembayaran <=', '2018-05-31');
- $this->db->where('id_mhs',$id_mhs);
- $bln=$this->db->get('pembayaran')->result();
- foreach ($bln as $key) {
- return $key->tgl;
- }
- }
- function juni($id_mhs){
- $this->db->select('count(*) as tgl');
- $this->db->where('tgl_pembayaran >=', '2018-06-01');
- $this->db->where('tgl_pembayaran <=', '2018-06-31');
- $this->db->where('id_mhs',$id_mhs);
- $bln=$this->db->get('pembayaran')->result();
- foreach ($bln as $key) {
- return $key->tgl;
- }
- }
- function juli($id_mhs){
- $this->db->select('count(*) as tgl');
- $this->db->where('tgl_pembayaran >=', '2018-07-01');
- $this->db->where('tgl_pembayaran <=', '2018-07-31');
- $this->db->where('id_mhs',$id_mhs);
- $bln=$this->db->get('pembayaran')->result();
- foreach ($bln as $key) {
- return $key->tgl;
- }
- }
- function agustus($id_mhs){
- $this->db->select('count(*) as tgl');
- $this->db->where('tgl_pembayaran >=', '2018-08-01');
- $this->db->where('tgl_pembayaran <=', '2018-08-31');
- $this->db->where('id_mhs',$id_mhs);
- $bln=$this->db->get('pembayaran')->result();
- foreach ($bln as $key) {
- return $key->tgl;
- }
- }
- function september($id_mhs){
- $this->db->select('count(*) as tgl');
- $this->db->where('tgl_pembayaran >=', '2018-09-01');
- $this->db->where('tgl_pembayaran <=', '2018-09-31');
- $this->db->where('id_mhs',$id_mhs);
- $bln=$this->db->get('pembayaran')->result();
- foreach ($bln as $key) {
- return $key->tgl;
- }
- }
- function oktober($id_mhs){
- $this->db->select('count(*) as tgl');
- $this->db->where('tgl_pembayaran >=', '2018-10-01');
- $this->db->where('tgl_pembayaran <=', '2018-10-31');
- $this->db->where('id_mhs',$id_mhs);
- $bln=$this->db->get('pembayaran')->result();
- foreach ($bln as $key) {
- return $key->tgl;
- }
- }
- function november($id_mhs){
- $this->db->select('count(*) as tgl');
- $this->db->where('tgl_pembayaran >=', '2018-11-01');
- $this->db->where('tgl_pembayaran <=', '2018-11-31');
- $this->db->where('id_mhs',$id_mhs);
- $bln=$this->db->get('pembayaran')->result();
- foreach ($bln as $key) {
- return $key->tgl;
- }
- }
- function desember($id_mhs){
- $this->db->select('count(*) as tgl');
- $this->db->where('tgl_pembayaran >=', '2018-12-01');
- $this->db->where('tgl_pembayaran <=', '2018-12-31');
- $this->db->where('id_mhs',$id_mhs);
- $bln=$this->db->get('pembayaran')->result();
- foreach ($bln as $key) {
- return $key->tgl;
- }
- }
Add Comment
Please, Sign In to add comment