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

class Add_Candidate_Model extends CI_Model
{
    function Insert_Data_Candidates($data)
    {
        $this->db->insert('participants',$data);
        
       if($this->db->affected_rows())
       {
            return true;
       }

       else
       {
           return false;
       }
    }

    function Show_Ballot()
    {
        $query = $this->db->select('*')->from('ballot')->get();
    
       if($query->num_rows()>0)
       {
             return $query->result();
       }

       else
       {
           return false;
       }
    }

}

?>
