List:General Discussion« Previous MessageNext Message »
From:Douglas Brantz Date:March 18 2000 9:56pm
Subject:Help With Drop Down Menu
View as plain text  
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 ./ line 36, near ")
#Now set up an array and a hash:
Execution of ./ aborted due to compilation errors (#1)

    (F) The final summary message when a Perl compilation fails.

Uncaught exception from user code:
        Execution of ./ 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',
-labels=>'\%s_project_labels'} );

Thanks for all the help in advance - should I be posting this to a Perl
Am I getting the info correctly from Mysql ?


Douglas Brantz

Help With Drop Down MenuDouglas Brantz19 Mar
  • Drop Down Menu Resolved!Douglas Brantz19 Mar
  • Re: Problems with Drop Down Menu!Douglas Brantz19 Mar