[Dbix-class] problem accessing stored procedure
Devin Austin
devin.austin at gmail.com
Mon Oct 30 08:40:59 GMT 2006
hey everyone,
I'm attempting to select the userid and count(*) from my Users table
where username=3D$q->param('username')
and password=3D$q->param('password'), using the following code:
my $user =3D $schema->resultset('User')->single(
> {
> username =3D> $q->param('username'),
> password =3D> $q->param('password')
> },
> {
> select =3D> [
> 'userid', { count =3D> '*' }
> ],
> as =3D> [qw/userid is_authorized/],
> }
> );
>
> my $userid =3D $user->userid;
> my $authenticated =3D $user->is_authorized eq '1' ? 1 : 0;
I'm getting this error:
> "Can't locate object method "is_authorized" via package "Notes::DBI::User"
> at Notes.pm line 323"
Line 323 is my $authenticated =3D $user->is_authorized eq '1' ? 1 : 0;. I've
read the docs<http://search.cpan.org/%7Edanieltwc/DBIx-Class-0.07002/lib/D=
BIx/Class/Manual/Cookbook.pod#Using_database_functions_or_stored_procedures=
>,
but have had no success in grokking them or getting things to work.
Ideas?
-- =
timorperfectus.com - web design to frightening perfection.
One last song
Given to an Angel's Son
As soon as you were gone
As soon as you were gone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jules.scsys.co.uk/pipermail/dbix-class/attachments/20061030/1ef=
9343b/attachment.htm
More information about the Dbix-class
mailing list