<?php
class Progressmodel extends CI_Model {

    var $task="";
    var $status="";
    var $percent;

    function __construct()
    {
        parent::__construct();
    }

    function delete(){
        $this->db->empty_table('progress');
    }

    function get($condition="")
    {
        if(!empty($condition))
           $this->db->where($condition);
        return $this->db->get('progress');
    }

    function insert($task,$status,$percent){
        $this->db->empty_table('progress');
        $this->task = $task;
        $this->status = $status;
        $this->percent = $percent;
        $this->db->insert('progress',$this);
    }

    
}