<?php

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

class Front_countdown_model extends CI_Model{

    function insert_front_countdown($data){

        $query = $this->db->insert('front_countdown',$data);

        if($query){
            return TRUE;
        }
        else{
            return FALSE;
        }

    }


    function show_front_countdown(){

		$query = $this->db->get('front_countdown');
		$res = $query->result_array();
	 	return $res;

    }
    
    function update_front_countdown($data){
        $array = array(
            'total_experience' => $data['total_experience'],
            'happy_clients' => $data['happy_clients'],
            'projects_done' => $data['projects_done']
        );
    
        $this->db->where('front_countdownid', $data['front_countdownid']);
        $query = $this->db->update('front_countdown', $array);

        if($query){
            return TRUE;
        }
        else{
            return FALSE;
        }
    }

}

?>