commitall

This commit is contained in:
Sampanna Rimal
2024-07-10 18:28:19 +05:45
parent 140abda4e6
commit 9cd05ef3cb
15723 changed files with 4818733 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
<?php
class School_model extends CI_Model
{
public function __construct()
{
parent::__construct();
$this->db = $this->load->database('schoolSetting', TRUE);
}
public function get_table_info($table_name, $where = '', $sqlQry = '', $order = 'ASC', $limit = FALSE, $offset = FALSE)
{
if ($limit)
$this->db->limit($limit, $offset);
if ($where != '')
$this->db->where($where);
$this->db->order_by($table_name . '.id', $order);
$query = $this->db->get($table_name);
if ($sqlQry != '')
$query = $this->db->query($sqlQry);
return $query->result_array();
}
public function get_table_info_row($table_name, $where = '', $sqlQry = '', $order = 'DESC', $limit = FALSE, $offset = FALSE)
{
if ($limit)
$this->db->limit($limit, $offset);
if ($where != '')
$this->db->where($where);
$this->db->order_by($table_name . '.id', $order);
$query = $this->db->get($table_name);
if ($sqlQry != '')
$query = $this->db->query($sqlQry);
return $query->row_array();
}
public function get_logo_from_setting()
{
$this->db->select('*');
$this->db->from('school_settings');
$query = $this->db->get();
return $query->row_array();
}
}