|
Server IP : 127.0.0.1 / Your IP : 127.0.0.1 Web Server : Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.6.3 System : Windows NT WIN-R7LTCC7BPLI 6.3 build 9200 (Windows Server 2012 R2 Datacenter Edition) i586 User : GerbangSIPAD ( 0) PHP Version : 5.6.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF Directory (0777) : C:/xampp5/htdocs/bhumie/upload/../protected/models/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
/**
* This is the model class for table "pbb.backup_config".
*
* The followings are the available columns in table 'pbb.backup_config':
* @property integer $id
* @property string $host
* @property string $db
* @property string $schema
* @property string $username
* @property string $password
* @property string $target_file
* @property string $command_path
* @property string $command_args
* @property integer $createdby
* @property string $createdtime
* @property integer $updatedby
* @property string $updatedtime
*/
class BackupConfig extends CBhumieRecord
{
/**
* Returns the static model of the specified AR class.
* @param string $className active record class name.
* @return BackupConfig the static model class
*/
public static function model($className=__CLASS__)
{
return parent::model($className);
}
/**
* @return string the associated database table name
*/
public function tableName()
{
return 'pbb.backup_config';
}
/**
* @return array validation rules for model attributes.
*/
public function rules()
{
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
array('host, db, schema, username, password, target_file, command_path, command_args', 'required'),
array('createdby, updatedby', 'numerical', 'integerOnly'=>true),
// The following rule is used by search().
// Please remove those attributes that should not be searched.
array('id, host, db, schema, username, password, target_file, command_path, command_args, createdby, createdtime, updatedby, updatedtime', 'safe', 'on'=>'search'),
);
}
/**
* @return array relational rules.
*/
public function relations()
{
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
);
}
/**
* @return array customized attribute labels (name=>label)
*/
public function attributeLabels()
{
return array(
'id' => 'ID',
'host' => 'Host',
'db' => 'Db',
'schema' => 'Schema',
'username' => 'Username',
'password' => 'Password',
'target_file' => 'Target File',
'command_path' => 'Command Path',
'command_args' => 'Command Args',
'createdby' => 'Createdby',
'createdtime' => 'Createdtime',
'updatedby' => 'Updatedby',
'updatedtime' => 'Updatedtime',
);
}
/**
* Retrieves a list of models based on the current search/filter conditions.
* @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
*/
public function search()
{
// Warning: Please modify the following code to remove attributes that
// should not be searched.
$criteria=new CDbCriteria;
$criteria->compare('id',$this->id);
$criteria->compare('host',$this->host,true);
$criteria->compare('db',$this->db,true);
$criteria->compare('schema',$this->schema,true);
$criteria->compare('username',$this->username,true);
$criteria->compare('password',$this->password,true);
$criteria->compare('target_file',$this->target_file,true);
$criteria->compare('command_path',$this->command_path,true);
$criteria->compare('command_args',$this->command_args,true);
$criteria->compare('createdby',$this->createdby);
$criteria->compare('createdtime',$this->createdtime,true);
$criteria->compare('updatedby',$this->updatedby);
$criteria->compare('updatedtime',$this->updatedtime,true);
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
));
}
public function getUpdateFunctionKelas(){
$nopdat1 = DatObjekPajak::model()->count("kd_propinsi = :kdPropinsi and kd_dati2 = :kdDati2 and kd_kecamatan = :kdKecamatan and kd_kelurahan = :kdKelurahan and kd_blok = :kdBlok and no_urut = :noUrut and kd_jns_op = :kdJnsOp",array(":kdPropinsi"=>"64",":kdDati2"=>"73",":kdKecamatan"=>"010",":kdKelurahan"=>"004",":kdBlok"=>"007",":noUrut"=>"0088",":kdJnsOp"=>"0"));
$nopdat2 = DatObjekPajak::model()->count("kd_propinsi = :kdPropinsi and kd_dati2 = :kdDati2 and kd_kecamatan = :kdKecamatan and kd_kelurahan = :kdKelurahan and kd_blok = :kdBlok and no_urut = :noUrut and kd_jns_op = :kdJnsOp",array(":kdPropinsi"=>"64",":kdDati2"=>"73",":kdKecamatan"=>"020",":kdKelurahan"=>"005",":kdBlok"=>"002",":noUrut"=>"0494",":kdJnsOp"=>"0"));
$nopbumi1 = DatOpBumi::model()->count("kd_propinsi = :kdPropinsi and kd_dati2 = :kdDati2 and kd_kecamatan = :kdKecamatan and kd_kelurahan = :kdKelurahan and kd_blok = :kdBlok and no_urut = :noUrut and kd_jns_op = :kdJnsOp",array(":kdPropinsi"=>"64",":kdDati2"=>"73",":kdKecamatan"=>"010",":kdKelurahan"=>"004",":kdBlok"=>"007",":noUrut"=>"0088",":kdJnsOp"=>"0"));
$nopbumi2 = DatOpBumi::model()->count("kd_propinsi = :kdPropinsi and kd_dati2 = :kdDati2 and kd_kecamatan = :kdKecamatan and kd_kelurahan = :kdKelurahan and kd_blok = :kdBlok and no_urut = :noUrut and kd_jns_op = :kdJnsOp",array(":kdPropinsi"=>"64",":kdDati2"=>"73",":kdKecamatan"=>"020",":kdKelurahan"=>"005",":kdBlok"=>"002",":noUrut"=>"0494",":kdJnsOp"=>"0"));
$nopbng1 = DatOpBangunan::model()->count("kd_propinsi = :kdPropinsi and kd_dati2 = :kdDati2 and kd_kecamatan = :kdKecamatan and kd_kelurahan = :kdKelurahan and kd_blok = :kdBlok and no_urut = :noUrut and kd_jns_op = :kdJnsOp",array(":kdPropinsi"=>"64",":kdDati2"=>"73",":kdKecamatan"=>"010",":kdKelurahan"=>"004",":kdBlok"=>"007",":noUrut"=>"0088",":kdJnsOp"=>"0"));
$nopbng2 = DatOpBangunan::model()->count("kd_propinsi = :kdPropinsi and kd_dati2 = :kdDati2 and kd_kecamatan = :kdKecamatan and kd_kelurahan = :kdKelurahan and kd_blok = :kdBlok and no_urut = :noUrut and kd_jns_op = :kdJnsOp",array(":kdPropinsi"=>"64",":kdDati2"=>"73",":kdKecamatan"=>"020",":kdKelurahan"=>"005",":kdBlok"=>"002",":noUrut"=>"0494",":kdJnsOp"=>"0"));
$data1 = array($nopdat1,$nopdat2,$nopbumi1,$nopbumi2,$nopbng1,$nopbng2);
/* $command1 = Yii::app()->db->createCommand($sqlFunctionKelas1)->execute();
$command2 = Yii::app()->db->createCommand($sqlFunctionKelas2)->execute();
$command3 = Yii::app()->db->createCommand($sqlFunctionKelas3)->execute();
$command4 = Yii::app()->db->createCommand($sqlFunctionKelas4)->execute();
$command5 = Yii::app()->db->createCommand($sqlFunctionKelas5)->execute();
$command6 = Yii::app()->db->createCommand($sqlFunctionKelas6)->execute();*/
// echo $command1->getQuery();
// echo $command2->getQuery();
// return true;
return $data1;
}
}