public function getAmpd() { //relation ตำบลไปอำเภอ return $this->hasOne(Amphures::className(), ['AMPHUR_ID' => 'AMPHUR_ID']); }
protected function getAmp($id) { $datas = Amphures::find()->where(['PROVINCE_ID' => $id])->all(); return $this->MapData($datas, 'AMPHUR_ID', 'AMPHUR_NAME'); }
public function getAmphur() { return $this->hasOne(Amphures::className(), ['AMPHUR_ID' => 'ampur']); }
public function getAmpp() { //relation จังหวัดไปอำเภอ return $this->hasMany(Amphures::className(), ['PROVINCE_ID' => 'PROVINCE_ID']); }