<?php
	

class BackModel extends CI_Model {

public function insert_data1($data_array1,$table1){
$this->db->insert($table1,$data_array1);
return $this->db->insert_id();    
}

public function check_user_exist($email,$password) {
$table='users';
$info=array();
$this->db->select('*');
$this->db->from($table);
$this->db->where('userEmail',$email);
$this->db->where('password',$password);
// $this->db->order_by('id',"DESC");
$info=$this->db->get()->result_array();
return $info; 
}


public function get_item_data($id,$table){
$info=array();
$this->db->select('*');
$this->db->from($table);
$this->db->where('id',$id);
$info=$this->db->get()->result_array();
return $info; 
}
} 