HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.52.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 15 06:39:08 EDT 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/barbeatleanalyti/www/mbaris.beatleanalytics.com/application/models/Beatle_survey2_model.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Beatle_survey2_model extends CI_Model {

    public function __construct()
    {
        parent::__construct();
        $this->load->database();
    }

    public function get_all()
    {
        $query = $this->db->get('beatle_survey2');
        return $query->result_array();
    }

    public function get_by_id($id)
    {
        $query = $this->db->get_where('beatle_survey2', array('surveyId' => $id));
        return $query->row_array();
    }

    public function insert($data)
    {
        return $this->db->insert('beatle_survey2', $data);
    }

    public function update($id, $data)
    {
        $this->db->where('surveyId', $id);
        return $this->db->update('beatle_survey2', $data);
    }

    public function delete($id)
    {
        return $this->db->delete('beatle_survey2', array('surveyId' => $id));
    }
}