D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
public_html
/
alumni
/
application
/
models
/
admin
/
Filename :
AdminManagement.php
back
Copy
<?php /** * Description of User * * @author Softpro India Pvt. Ltd. */ class AdminManagement extends CI_Model { //put your code here function saveAdmin($adminDetails) { $this->db->insert("tbl_admins", $adminDetails); return $this->db->insert_id(); } function getAdmins($admin_userid) { $this->db->select("*"); $this->db->from("tbl_admins"); $this->db->where("admin_userid NOT IN ('$admin_userid')"); return $this->db->get(); } function updateAdmin($adminDetails) { $this->db->where("admin_id", $adminDetails["admin_id"]); return $this->db->update("tbl_admins", $adminDetails); } function getAdmin($admin_id, $password) { $this->db->select("*"); $this->db->from("tbl_admins"); $this->db->where("admin_id", $admin_id); $this->db->where("admin_password", $password); return $this->db->get(); } function getAdminByUserID($admin_id) { $this->db->select("*"); $this->db->from("tbl_admins"); $this->db->where("admin_userid", $admin_id); return $this->db->get(); } }