<?php
require_once ("kontrolDB.php");

class beranda
{
	private $db_handle;
	
    public function __construct()
    {
       $this->db_handle = new kontrolDB();
    }
    
    public function jmlTesting()
    {        
		$sql = "SELECT COUNT(DISTINCT(kode)) as jml FROM knn_testing";
		$paramType  = "";
		$paramValue = array();        
        $result = $this->db_handle->getData($sql, $paramType, $paramValue);
        return $result;
    }
	

    public function jmlTraining()
    {        
		$sql = "SELECT COUNT(distinct(kode_training)) as jml FROM knn_training";
		$paramType  = "";
		$paramValue = array();        
        $result = $this->db_handle->getData($sql, $paramType, $paramValue);
        return $result;
    }

    public function jmlKriteria()
    {        
		$sql = "SELECT COUNT(id_kriteria) as jml FROM knn_kriteria";
		$paramType  = "";
		$paramValue = array();        
        $result = $this->db_handle->getData($sql, $paramType, $paramValue);
        return $result;
    }

    public function jmlKriteriaNilai()
    {        
		$sql = "SELECT COUNT(id_kriteria_nilai) as jml FROM knn_kriteria_nilai";
		$paramType  = "";
		$paramValue = array();        
        $result = $this->db_handle->getData($sql, $paramType, $paramValue);
        return $result;
    }
 
	

}
?>