public function actionLoad($id = 0) { $xml = new XmlForm(); if ($id == 0) { $rr = $xml->readsimple($id); } else { $rr = $xml->readnomen(); } $this->render('test', array('rr' => $rr)); }
public function actionTest($id = false) { $xml = new XmlForm(); $rr = $xml->readsimple($id); if ($id) { $this->render('test_2', array('model' => array(), 'rr' => $rr)); return; } $connection = Yii::app()->db; $sql = 'SELECT productgroup_id.ckey AS zkey,' . 'product_group.ckey AS zid, ' . 'product_group.tnam AS zname, ' . 'product_group.cgr AS zgr ' . 'FROM product_group LEFT JOIN productgroup_id ON product_group.ckey=productgroup_id.id'; $res = $connection->createCommand($sql)->queryAll(); $this->render('test_2', array('model' => $res, 'rr' => $rr)); }