This is how I am trying to grab all the titles from the project table:
Here is the error I get now.
--------------------------- error
syntax error at ./projectout.pl line 36, near ")
#Now set up an array and a hash:
my"
Execution of ./projectout.pl aborted due to compilation errors (#1)
(F) The final summary message when a Perl compilation fails.
Uncaught exception from user code:
Execution of ./projectout.pl aborted due to compilation errors.
--------------------------- end of error
Here is the code I am using.
my $sth = $dbh->Query("select title from project")
or die $Mysql::db_errstr;
my $numrows = $sth->rows;
if ($numrows = = 0)
#Now set up an array and a hash:
my @s_project_values= ();
my %s_project_labels;
#Loop through all the records found and fill the array and hash:
my $i;
for( $i = 0; $i < $numrows; $i++ )
{
my @row = $sth->fetchrow_array;
push( @s_project_values, $row[1]);
$s_project_labels{$row[1]} = $row[0];
}
# now create the drop down menu
print $query->scrolling_list({ -name=>'NEWBNAME',-size=>'1',
-onchange=>'location_change(this)',
-values=>'\@s_project_values',
-labels=>'\%s_project_labels'} );
Thanks for all the help in advance - should I be posting this to a Perl
listserve?
Am I getting the info correctly from Mysql ?
Thanks,
Douglas Brantz