HEX
Server: Apache/2.4.41 (Amazon) OpenSSL/1.0.2k-fips PHP/5.6.40
System: Linux ip-172-31-40-18 4.14.146-93.123.amzn1.x86_64 #1 SMP Tue Sep 24 00:45:23 UTC 2019 x86_64
User: apache (48)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: /var/www/html/taxicamera/application/libraries/General.php
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class General{
	public $ci;
	function __construct(){
		$this->ci=& get_instance();
		$this->ci->load->database();
	}
	public function insert($table,$data){
		$this->ci->db->insert($table,$data);
		return $this->ci->db->insert_id();
	}
	public function update($table,$condition,$data){
		$this->ci->db->where($condition);
		$this->ci->db->update($table,$data);
		return true;
	}
	public function delete($table,$condition){
		$this->ci->db->where($condition);
		$this->ci->db->delete($table);
		return true;
	}
	public function get_all_details($table,$condition=array(),$order=''){
		$this->ci->db->select('*');
		$this->ci->db->from($table);
		$this->ci->db->where($condition);
		$this->ci->db->order_by($order);
		$query=$this->ci->db->get();
		return $query->result_array();
	}
	public function get_details($table,$condition=array(),$order=''){
		$this->ci->db->select('*');
		$this->ci->db->from($table);
		$this->ci->db->where($condition);
		$this->ci->db->order_by($order);
		$query=$this->ci->db->get();
		return $query->row_array();
	}

	
}