<?php
class Ppn{

    private $table = "T_Ppn";
    private $itemPerPageAdmin = 10;


    public function get_ppn($crud){
        $result = 0;

        $text = "SELECT * FROM $this->table LIMIT 1";
        $query = $crud->conn()->query($text);
        if($query->num_rows >= 1){
            $result = array();
            while($row = $query->fetch_assoc()){
                $result[] = $row;
            }
        }
        return $result;
    }


    public function update_ppn($crud, $id, $ppn){
        $result = 0;

        $text = "UPDATE $this->table SET ppn_value = '$ppn' WHERE ppn_id = '$id'";
        $result = $crud->execute_query($text);
        return $result;
    }
//END FUNCTION FOR ADMIN PAGE
}
?>