On Wed, Jun 13, 2012 at 4:54 PM, Kenneth S Mclane <[email protected]>wrote:

> 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 = $c->model('ORANGES::Departments')->search_rs({'department_code'
> => $departmentcode}, {
>                 columns => ['department_id'] })->single;


search_rs() returns a ResultSet, not the rows.. Try using search() instead.
L.

-- 
[email protected]   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.
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to