Пример #1
0
 public function actionClientiEFornitori($c, $f)
 {
     $criteria = new CDbCriteria();
     //$criteria->with=array('rl_aziende_clienti');
     $cliente_searched = Clienti::model()->findByPk($c);
     $fornitore_searched = Fornitori::model()->findByPk($f);
     //$clientifedeli= Clienti::model()->malpag()->findAll();
     $clientifedeli = TipoOrdine::model()->findAll();
     //PROVA METODO FINDALLBYSQL!!! (funzionante)
     //$sql="SELECT * FROM fornitori WHERE id_fornitore=:param";
     //$param=array(":param"=>$f);
     //$prova= Fornitori::model()->findAllBySql($sql,$param);
     //CVarDumper::dump($prova,10, true); die();
     $fornitori = Fornitori::model()->findAll();
     $this->render("esercizio3", array('fornitori' => $fornitori, 'clienti' => $clientifedeli, 'cliente_searched' => $cliente_searched, 'fornitore_searched' => $fornitore_searched));
 }
Пример #2
0
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return Fornitori the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Fornitori::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }