[Catalyst] Can't get value from model
Len Jaffe
lenjaffe at jaffesystems.com
Wed Jun 13 21:02:48 GMT 2012
On Wed, Jun 13, 2012 at 4:54 PM, Kenneth S Mclane <ksmclane at us.ibm.com>wrot=
e:
> I am trying to get the value from a model call into a variable so I can
> use it for creating a DB record. I have tried multiple ways and cannot get
> the value to return. Here is my current attempt:
>
> my $dept =3D $c->model('ORANGES::Departments')->search_rs({'department_co=
de'
> =3D> $departmentcode}, {
> columns =3D> ['department_id'] })->single;
search_rs() returns a ResultSet, not the rows.. Try using search() instead.
L.
-- =
lenjaffe at jaffesystems.com 614-404-4214 www.volunteerable.net
Proprietor: http://www.theycomewithcheese.com/ - An Homage to Fromage
Greenbar <http://www.greenbartraining.org/>: Grubmaster: 2012-2009, Grub
Asst: 2008, Trained: 2007.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20120613/e32b2=
29e/attachment.htm
More information about the Catalyst
mailing list