TS 6.5 SP2 on WIndows.
I have a simple snippet which works fine in fetching data from database and populating the select box. I am confused on how to set "value" and "label" of each option to be same. I am fetching the entire column into select box but when i select the array element it return the index of that element when i do a getValue on it. Here is my snippet. Please advice.
my $sel = $dbh->prepare( "SELECT ModelNumber FROM tblCmgtProduct ORDER BY ModelNumber asc; " );
$sel->execute();
my @ModelNumber;
print "\n";
print "\n";
while(my @row = $sel -> fetchrow_array()){
if($row[0]=~m/\&/)
{
$row[0] =~s/\&/\&/;
$row[0] =~s/\'/\'/;
}
push (@ModelNumber, $row[0]);
print "\n" ;
}
print "\n";
Thanks