Viewing file: da_umuser.php (1.92 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php class Da_umuser extends CI_Model { // PK is UsID
public $UsID; public $UsName; public $UsLogin; public $UsPassword; public $UsPsCode; public $UsWgID; public $UsQsID; public $UsAnswer; public $UsEmail; public $UsActive; public $UsAdmin; public $UsDesc; public $UsPwdExpDt; public $UsUpdDt; public $UsUpdUsID; public $UsSessionID;
function Da_umuser() { parent::__construct(); $this->db = $this->load->database('ums', TRUE); }
function insert() { $sql = "INSERT INTO umuser (UsName, UsLogin, UsPassword, UsPsCode, UsWgID, UsQsID, UsAnswer, UsEmail, UsActive, UsAdmin, UsDesc, UsPwdExpDt, UsUpdDt, UsUpdUsID, UsSessionID) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; $this->db->query($sql, array($this->UsName, $this->UsLogin, $this->UsPassword, $this->UsPsCode, $this->UsWgID, $this->UsQsID, $this->UsAnswer, $this->UsEmail, $this->UsActive, $this->UsAdmin, $this->UsDesc, $this->UsPwdExpDt, $this->UsUpdDt, $this->UsUpdUsID, $this->UsSessionID)); }
function update() { $sql = "UPDATE umuser SET UsName = ?, UsLogin = ?, UsPassword = ?, UsPsCode = ?, UsWgID = ?, UsQsID = ?, UsAnswer = ?, UsEmail = ?, UsActive = ?, UsAdmin = ?, UsDesc = ?, UsPwdExpDt = ?, UsUpdDt = ?, UsUpdUsID = ?, UsSessionID = ? WHERE UsID = ? "; $this->db->query($sql, array($this->UsName, $this->UsLogin, $this->UsPassword, $this->UsPsCode, $this->UsWgID, $this->UsQsID, $this->UsAnswer, $this->UsEmail, $this->UsActive, $this->UsAdmin, $this->UsDesc, $this->UsPwdExpDt, $this->UsUpdDt, $this->UsUpdUsID, $this->UsSessionID, $this->UsID)); }
function delete($key) { $sql = "DELETE FROM umuser WHERE UsID = ? "; $this->db->query($sql, array($key)); }
function getByKey($key) { $sql = "SELECT * FROM umuser WHERE UsID = ? "; $query = $this->db->query($sql, array($key)) ; return $query ; }
} //=== end class da_umuser
?>
|