values in drop down list called via CActiveForm::dropDownList() is be populated by passing array of value => text as parameter.
eg, to select sex of a person, in the form view file:
<?php echo $form->dropDownList($form, 'sex', array('1' =&g… more »
when selecting a column as alias name, a variable (property) of the same name must be manually defined in the model. eg, if the sql is:select column_1 as alias_a from table_1 in the model file:class MyModel as CActiveRecord { public $alias… more »
to select distinct column values from a table, there are a few things to note to make sure only distinct rows are returned.
in /path/to/lib/model/doctrine/SomeTable.class.php:
public function getDistinctValue() {
$q = Doctrine_Query()::create()… more »
notes and references on web development and various things.
disclaimers
this site does not guarantee accuracy of information provided. codes may not be tested, are provided as is and are free to to use. use at your own risk. limited or no support will be provided.
under no circumstances shall this site be responsible or liable for any damages or consequences as a result of direct or indirect usage of any information from this website.