[Catalyst] Insert Multiple rows - GOOD CODE

Will Smith willbelair at yahoo.com
Mon Dec 19 21:57:02 CET 2005


thank you for your help. This is the code, and the error that I got. 
   
  foreach my $artist ( @{$c->req->params->{artistid}} ) {
    my @test = $c->req->params('cdtitle');
    if ($artist){
     my $cd = mymusic::M::CDBI::Cd->find_or_create(
      artistid => $artist
     );
    $cd->title(shift @{$c->req->params->{cdtitle}});
    $cd->update();
}}
$c->stash->{template} = 'Cd/list.tt';
}
   
  ----- the error message:
  Caught exception "Can't use string ("cdtitle") as a HASH ref while "strict refs" in use.
   
  I guess that because of the declaration of the hash, but not sure how to fix that.
   
  Thank you

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20051219/ce42ccd0/attachment.htm


More information about the Catalyst mailing list