quantico
(Liarevalo)
November 20, 2011, 11:07pm
1
i have the next line code to look for registry by the attribute guatemala.gif in the gif field of the table paises
$bandera=Paises::model()->findByAttributes(array('gif'=>'guatemala.gif')
and i need to print (echo) other field called active of the same registry, but i don’t know how to do it without zii.widgets.CDetailView just like get plain sting e.g. “yes”
please can you help me?
quantico
(Liarevalo)
November 21, 2011, 9:10pm
2
I figure out
how I did it
note: I am using other fields.
<?php
$bandera=Paises::model()->find(array('select'=>'gif',
'order'=>'gif', 'condition'=>'gif=:x', 'params'=>array(':x'=>'guatemala.gif')));
echo "<img src=\"".Yii::app()->theme->baseUrl."/../../images/flags/$bandera[gif]\">";
?>
quantico:
i have the next line code to look for registry by the attribute guatemala.gif in the gif field of the table paises
$bandera=Paises::model()->findByAttributes(array('gif'=>'guatemala.gif')
and i need to print (echo) other field called active of the same registry, but i don’t know how to do it without zii.widgets.CDetailView just like get plain sting e.g. “yes”
please can you help me?