[Catalyst] Param in the search method

Marcus Ramberg marcus at thefeed.no
Thu Oct 6 12:35:46 CEST 2005


On 10/5/05, Will Smith <willbelair at yahoo.com> wrote:
>
> hi,
> Can i pass a param from an html page into te search method:
> ----------
> $c->stash->{artist} =
> music::M::CDBI::Artist->search_like(name=>'%$my_parameter%'); ###
> my_parameter is the name field from an html page that call the sub
> ---------
> Thanks
>

$c->stash->{artist} =
music::M::CDBI::Artist->search_like(name=>$c->req->param('my_parameter').'%');

Like this?

--
With regards
Marcus Ramberg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20051006/b3f6d815/attachment.htm


More information about the Catalyst mailing list