| Viewing file:  da_rg_Config.php (3.58 KB)      -rwxr-xr-x Select action/file-type:
 
  (+) |  (+) |  (+) | Code (+) | Session (+) |  (+) | SDB (+) |  (+) |  (+) |  (+) |  (+) |  (+) | 
 
<?php
 include_once("my_model.php");
 
 class Da_rg_Config extends My_model {
 
 // PK is
 
 public $cfgSiteBanner;
 public $cfgSiteName;
 public $cfgClgLogo;
 public $cfgClgCode;
 public $cfgClgName;
 public $cfgClgNameE;
 public $cfgClgAddr;
 public $cfgClgPhoneNo;
 public $cfgClgBankName;
 public $cfgClgBankAccountName;
 public $cfgClgBankNo;
 public $cfgClgBankLogo;
 public $cfgClgBankFee;
 public $cfgInstituteLogo;
 public $cfgInstitute;
 public $cfgInstituteE;
 public $cfgMinistry;
 public $cfgMinistryE;
 public $cfgBgClTrAndTd;
 public $cfgBgClSwapTr;
 public $cfgFnClHeadTb;
 public $cfgFnClErrSpec;
 public $cfgCheckPP;
 public $cfgCheckSP;
 
 public $last_insert_id;
 
 function Da_rg_Config() {
 parent::__construct();
 $this->load->database('rg', TRUE);
 }
 
 function insert() {
 // if there is no auto_increment field, please remove it
 $sql = "INSERT INTO $this->rg_dbname.rg_Config (cfgSiteBanner, cfgSiteName, cfgClgLogo, cfgClgCode, cfgClgName, cfgClgNameE, cfgClgAddr, cfgClgPhoneNo, cfgClgBankName, cfgClgBankAccountName, cfgClgBankNo, cfgClgBankLogo, cfgClgBankFee, cfgInstituteLogo, cfgInstitute, cfgInstituteE, cfgMinistry, cfgMinistryE, cfgBgClTrAndTd, cfgBgClSwapTr, cfgFnClHeadTb, cfgFnClErrSpec, cfgCheckPP, cfgCheckSP)
 VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
 $this->db->query($sql, array($this->cfgSiteBanner, $this->cfgSiteName, $this->cfgClgLogo, $this->cfgClgCode, $this->cfgClgName, $this->cfgClgNameE, $this->cfgClgAddr, $this->cfgClgPhoneNo, $this->cfgClgBankName, $this->cfgClgBankAccountName, $this->cfgClgBankNo, $this->cfgClgBankLogo, $this->cfgClgBankFee, $this->cfgInstituteLogo, $this->cfgInstitute, $this->cfgInstituteE, $this->cfgMinistry, $this->cfgMinistryE, $this->cfgBgClTrAndTd, $this->cfgBgClSwapTr, $this->cfgFnClHeadTb, $this->cfgFnClErrSpec, $this->cfgCheckPP, $this->cfgCheckSP));
 $this->last_insert_id = $this->db->insert_id();
 }
 
 function update() {
 // if there is no primary key, please remove WHERE clause.
 $sql = "UPDATE $this->rg_dbname.rg_Config
 SET    cfgSiteBanner=?, cfgSiteName=?, cfgClgLogo=?, cfgClgCode=?, cfgClgName=?, cfgClgNameE=?, cfgClgAddr=?, cfgClgPhoneNo=?, cfgClgBankName=?, cfgClgBankAccountName=?, cfgClgBankNo=?, cfgClgBankLogo=?, cfgClgBankFee=?, cfgInstituteLogo=?, cfgInstitute=?, cfgInstituteE=?, cfgMinistry=?, cfgMinistryE=?, cfgBgClTrAndTd=?, cfgBgClSwapTr=?, cfgFnClHeadTb=?, cfgFnClErrSpec=?, cfgCheckPP=?, cfgCheckSP=?";
 $this->db->query($sql, array($this->cfgSiteBanner, $this->cfgSiteName, $this->cfgClgLogo, $this->cfgClgCode, $this->cfgClgName, $this->cfgClgNameE, $this->cfgClgAddr, $this->cfgClgPhoneNo, $this->cfgClgBankName, $this->cfgClgBankAccountName, $this->cfgClgBankNo, $this->cfgClgBankLogo, $this->cfgClgBankFee, $this->cfgInstituteLogo, $this->cfgInstitute, $this->cfgInstituteE, $this->cfgMinistry, $this->cfgMinistryE, $this->cfgBgClTrAndTd, $this->cfgBgClSwapTr, $this->cfgFnClHeadTb, $this->cfgFnClErrSpec, $this->cfgCheckPP, $this->cfgCheckSP));
 }
 
 function delete() {
 // if there is no primary key, please remove WHERE clause.
 $sql = "DELETE FROM $this->rg_dbname.rg_Config";
 $this->db->query($sql, array());
 }
 
 /*
 * You have to assign primary key value before call this function.
 */
 function get_by_key($withSetAttributeValue=FALSE) {
 $sql = "SELECT *
 FROM $this->rg_dbname.rg_Config";
 $query = $this->db->query($sql, array());
 if ( $withSetAttributeValue ) {
 $this->row2attribute( $query->row() );
 } else {
 return $query ;
 }
 }
 
 }     //=== end class Da_rg_config
 ?>
 |