\Admin_model

Model Class

Summary

Methods
Properties
Constants
__construct()
__get()
getAdminByName()
getOneByName()
getAdminList()
getAdminAllList()
getAdminRow()
insertData()
setAdminByID()
getAdminCount()
_getWhere()
checkUnique()
delete()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$table
N/A

Properties

$table

$table : 

Type

Methods

__construct()

__construct() : void

Class constructor

__get()

__get(string  $key) 

__get magic

Allows models to access CI's loaded classes using the same syntax as controllers.

Parameters

string $key

getAdminByName()

getAdminByName(  $adminName, \unknown  $password = FALSE) 

根据用户名和密码获取用户信息

Parameters

$adminName
\unknown $password

getOneByName()

getOneByName(  $adminName) 

Parameters

$adminName

getAdminList()

getAdminList(  $where = array(),   $select = '*',   $limit = 10,   $start) 

获取用户列表

Parameters

$where
$select
$limit
$start

getAdminAllList()

getAdminAllList() 

获取用户列表

getAdminRow()

getAdminRow(  $adminId) 

获取单条数据

Parameters

$adminId

insertData()

insertData(  $userData) 

添加

Parameters

$userData

setAdminByID()

setAdminByID(  $updateData,   $adminId) 

修改

Parameters

$updateData
$adminId

getAdminCount()

getAdminCount(  $where = array()) 

获取总条数

Parameters

$where

_getWhere()

_getWhere(  $where = array()) 

查询条件

Parameters

$where

checkUnique()

checkUnique(  $name,   $adminId) 

验证唯一

Parameters

$name
$adminId

delete()

delete(  $adminId) 

删除用户

Parameters

$adminId