Viewing file: da_ummenu.php (1.7 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php class Da_ummenu extends CI_Model { // PK is MnID
public $MnStID; public $MnID; public $MnSeq; public $MnIcon; public $MnNameT; public $MnNameE; public $MnURL; public $MnDesc; public $MnToolbar; public $MnToolbarSeq; public $MnToolbarIcon; public $MnParentMnID; public $MnLevel;
function Da_ummenu() { parent::__construct(); $this->db = $this->load->database('ums', TRUE); }
function insert() { $sql = "INSERT INTO ummenu (MnStID, MnID, MnSeq, MnIcon, MnNameT, MnNameE, MnURL, MnDesc, MnToolbar, MnToolbarSeq, MnToolbarIcon, MnParentMnID, MnLevel) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; $this->db->query($sql, array($this->MnStID, $this->MnID, $this->MnSeq, $this->MnIcon, $this->MnNameT, $this->MnNameE, $this->MnURL, $this->MnDesc, $this->MnToolbar, $this->MnToolbarSeq, $this->MnToolbarIcon, $this->MnParentMnID, $this->MnLevel)); }
function update() { $sql = "UPDATE ummenu SET MnStID = ?, MnSeq = ?, MnIcon = ?, MnNameT = ?, MnNameE = ?, MnURL = ?, MnDesc = ?, MnToolbar = ?, MnToolbarSeq = ?, MnToolbarIcon = ?, MnParentMnID = ?, MnLevel = ? WHERE MnID = ? "; $this->db->query($sql, array($this->MnStID, $this->MnSeq, $this->MnIcon, $this->MnNameT, $this->MnNameE, $this->MnURL, $this->MnDesc, $this->MnToolbar, $this->MnToolbarSeq, $this->MnToolbarIcon, $this->MnParentMnID, $this->MnLevel, $this->MnID)); }
function delete($key) { $sql = "DELETE FROM ummenu WHERE MnID = ? "; $this->db->query($sql, array($key)); }
function getByKey($key) { $sql = "SELECT * FROM ummenu WHERE MnID = ? "; $query = $this->db->query($sql, array($key)) ; return $query ; }
} //=== end class da_ummenu
?>
|