|
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/protected/models/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
/**
* This is the model class for table "pbb.keluaran_pst".
*
* The followings are the available columns in table 'pbb.keluaran_pst':
* @property string $kd_jns_pelayanan
* @property integer $sppt_pelayanan
* @property integer $stts_pelayanan
* @property integer $dhkp_pelayanan
* @property integer $sk_pelayanan
* @property integer $createdby
* @property string $createdtime
* @property integer $updatedby
* @property string $updatedtime
*/
class KeluaranPst extends CBhumieRecord
{
/**
* Returns the static model of the specified AR class.
* @param string $className active record class name.
* @return KeluaranPst 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.keluaran_pst';
}
/**
* @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('kd_jns_pelayanan, sppt_pelayanan, stts_pelayanan, dhkp_pelayanan, sk_pelayanan, createdby, createdtime, updatedby, updatedtime', 'required'),
array('kd_jns_pelayanan, sppt_pelayanan, stts_pelayanan, dhkp_pelayanan, sk_pelayanan', 'required'),
//array('sppt_pelayanan, stts_pelayanan, dhkp_pelayanan, sk_pelayanan, createdby, updatedby', 'numerical', 'integerOnly'=>true),
array('sppt_pelayanan, stts_pelayanan, dhkp_pelayanan, sk_pelayanan', 'numerical', 'integerOnly'=>true),
array('kd_jns_pelayanan', 'length', 'max'=>2),
// The following rule is used by search().
// Please remove those attributes that should not be searched.
//array('kd_jns_pelayanan, sppt_pelayanan, stts_pelayanan, dhkp_pelayanan, sk_pelayanan, createdby, createdtime, updatedby, updatedtime', 'safe', 'on'=>'search'),
array('kd_jns_pelayanan, sppt_pelayanan, stts_pelayanan, dhkp_pelayanan, sk_pelayanan', '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(
'kd_jns_pelayanan' => 'Kd Jns Pelayanan',
'sppt_pelayanan' => 'Sppt Pelayanan',
'stts_pelayanan' => 'Stts Pelayanan',
'dhkp_pelayanan' => 'Dhkp Pelayanan',
'sk_pelayanan' => 'Sk Pelayanan',
//'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('kd_jns_pelayanan',$this->kd_jns_pelayanan,true);
$criteria->compare('sppt_pelayanan',$this->sppt_pelayanan);
$criteria->compare('stts_pelayanan',$this->stts_pelayanan);
$criteria->compare('dhkp_pelayanan',$this->dhkp_pelayanan);
$criteria->compare('sk_pelayanan',$this->sk_pelayanan);
//$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 searchJenisPelayanan()
{
$qry = 'SELECT y.kd_jns_pelayanan, x.nm_jenis_pelayanan, y.sppt_pelayanan, y.stts_pelayanan, y.dhkp_pelayanan, y.sk_pelayanan
FROM pbb.ref_jns_pelayanan x LEFT OUTER JOIN pbb.keluaran_pst y
ON x.kd_jns_pelayanan = y.kd_jns_pelayanan ORDER BY kd_jns_pelayanan';
$result = Yii::app()->db->createCommand($qry)->queryAll();
return new CArrayDataProvider($result,array('keyField'=>'kd_jns_pelayanan',
'pagination' => array(
'pageSize' => 14, // Banyak record yang akan di tampilkan
),
));
}
}