Hi WK,

Thanks for your reply. I am trying to get it to work.

my $Accomps = $dbh->selectall_hashref( $q, 'ID' );
>

After figuring out how to accommodate my placeholder in selectall_hashref I
did this:

 my $Accomps = $dbh->selectall_hashref( $q, 'ID', \%attr, $Sid );

Then as you suggested I do:

 # get parameter for accomp type keys
      foreach my $key ( keys %$Accomps ) {
      print "Checking: " . $key . " for value.\n";
      if ( param( $key ) ) {
          $input_hash->{ $key } = $Accomps->{ $key };
          print $key $input_hash->{ $key } . "\n";
      }
      }

(just printing temporarily to see if it trapped the values)

However, I get this error:

 Route exception: Can't use string ("1") as a symbol ref while "strict
refs" in use at /home/richard/Dancer2/MyApp/bin/../lib/MyApp.pm line 557.

Any idea what I am doing wrong?



>
> # Then:
> my $input_hash = {
>        Tech => param('tech'),
>        Type => param('type'),
> };
>
> foreach my $key ( keys %$Accomps ) {
>   if ( param( $key ) ) {
>     $input_hash->{ $key } = $Accomps->{ $key };
>   }
> }
>
>
> Wbr,
> --
> Kõike hääd,
>
> Gunnar
> _______________________________________________
> dancer-users mailing list
> [email protected]
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

Reply via email to