<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Animasi_model extends CI_Model {

	public function __construct()
	{
		parent::__construct();
		$this->load->database();
	}

	//ambil data nilai
	public function listing()
	{

		$this->db->select('*');
		$this->db->from('v_rpt_trans_formulir');
		$this->db->order_by('no_pendaftaran','desc');
		$query = $this->db->get();
		return $query->result();			
	}

	//hitung total siswa
	public function total()
	{

		$this->db->select('COUNT(*) AS total');
		$this->db->from('v_rpt_trans_formulir');
		//where
		$this->db->where('kd_kompetensi','ANIMASI');
		$this->db->order_by('no_pendaftaran','desc');
		$query = $this->db->get();
		return $query->row();			
	}


	// Total nilai animasi
	public function animasi()
	{
		$this->db->select('*');
		$this->db->from('v_rpt_trans_formulir');
		//where
		$this->db->where('kd_kompetensi','ANIMASI');
		$this->db->order_by('no_pendaftaran','desc');
		$query = $this->db->get();
		return $query->result();	
	}	
	
}