Hi,
now I have another question ...
Code:
sub {
my $back = qq|<select name="Ort">|;
my $tbl = $DB->table('Links');
$tbl->select_options('ORDER BY Ort ASC');
my $sth = $tbl->select();
while (my $hit = $sth->fetchrow_hashref) {
$back .= qq|<option value="$hit->{ID}">$hit->{Ort}</option>|;
}
$back .= q|</select>|;
}
If I understand this code rigth, then the number of rows in the select-field is equal to the number of entries in my db?
But I have the problem, that I have some duplicate values which are now shown as often as they are used in the field. But in the select-field I like to display a value only one time. And there is another problem when I have less values in the field than records in the db. Then empty rows are displayed in the select-field.
Kai
___________________________________________
http://www.westalgarve.de http://www.portugalforum.org http://www.portugal-links.de