I have this sql:
Code:
$sql="SELECT DISTINCT(area2_code), area2 FROM `cs_mytable`;";
and this SelectList:
Code:
$input['region'] =moscomprofilerHTML::selectList( $list_region, 'region', '', 'area2_code', 'area2', $selected);
I load the rows through loadAssocList(). The html generates the select block but the options statement do not pick up value and text.
I have also tried using 'value' and 'text' as follows but without success:
Code:
$sql="SELECT DISTINCT(area2_code) as 'value', area2 as 'text' FROM `cs_mytable`;";
Code:
$input['region'] =moscomprofilerHTML::selectList( $list_region, 'region', '', 'value', 'text', $selected);
Any suggestion how to fix it?
Thanks,
adop