<?php

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

class Mbackup extends CI_Model {

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

     public function inserbackup($namebackup, $user) {
        $query = $this->db->query("INSERT INTO backup VALUES (NULL,'$namebackup','$user','','','',CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP())");
        if ($query) {
            return 1;
        } else {
            return 0;
        }
    }
    public function updatebackup($html2,$usercad,$idbackup){
        $query = $this->db->query("UPDATE backup  SET fechageneracion=fechageneracion, fecharestauracion= CURRENT_TIMESTAMP(), html='$html2', usuariores='$usercad', res=1 WHERE idbackup=$idbackup");
    }
}