Re: [Dbix-class] Re: new name for "as"

2006-11-03 Thread Devin Austin
construct_as sounds good. I myself had to read the docs numberous times to realize that it doesn't work like "SELECT AS ...".On 11/3/06, A. Pagaltzis <[EMAIL PROTECTED]> wrote:* Matt S Trout < [EMAIL PROTECTED]> [2006-11-03 09:50]:> Anybody got any suggestions on a new name? construct_as maybe?`ac

Re: [Dbix-class] trouble with relationships

2006-11-02 Thread Devin Austin
=> $username )->notes;Easier, if you've already got the user object instantiated.my @all_user_notes = $user->notes;I think that does (a lot more simply) what you want. Devin Austin wrote:> I'm using this code to attempt to retrieve a related table's info:&g

[Dbix-class] trouble with relationships

2006-11-02 Thread Devin Austin
I'm using this code to attempt to retrieve a related table's info:my @all_user_notes = $user_notes->search_related('notes',         {             username => $session->param('username')         }    );     my @user_notes = map {         {             'noteid'    => $_->noteid,             'number

Re: [Dbix-class] Issues with using the as=>[...] parameter

2006-11-02 Thread Devin Austin
; >> Although I don't know why you just don't do:>> my $user = $schema->resultset('User')->find( username => $u );> if ($user->password eq $q->param('password')) { > ...> }>> That gives the added advantag

Re: [Dbix-class] Issues with using the as=>[...] parameter

2006-11-02 Thread Devin Austin
Ah good thinking lee.  Didn't mean to detract from the original message, i was just a bit confused.On 11/2/06, Lee Standen < [EMAIL PROTECTED]> wrote:You can't use count() without group by in this example. (Unless I'm mistaken). From what I'm seeing here, it sounds like what you really want is:my $

Re: [Dbix-class] Issues with using the as=>[...] parameter

2006-11-02 Thread Devin Austin
so if i'm understanding this correctly, the following code:my $user = $schema->resultset('User')->single(   {       username => $q->param('username'),      password => $q->param('password')  },  {    select => [  \'userid, COUNT(*) as is_authorized',     ], 

Re: [Dbix-class] problem accessing stored procedure

2006-10-30 Thread Devin Austin
when i use that, i get "DBIx::Class::InflateColumn::get_column(): No such column 'is_authorized' at Notes.pm line 323".Code: my $authenticated = $user->get_column('is_authorized') eq '1' ? 1 : 0;On 10/30/06, Jess Robinson < [EMAIL PROTECTED]> wro

[Dbix-class] problem accessing stored procedure

2006-10-30 Thread Devin Austin
hey everyone,I'm attempting to select the userid and count(*) from my Users table where username=$q->param('username') and password=$q->param('password'), using the following code: my $user = $schema->resultset('User')->single(   {       username => $q->param('username'),      password

[Dbix-class] oops forgot the error message...

2006-09-28 Thread Devin Austin
sorry all, I"m also receiving this error message:"Can't locate object method "count" via package "EoD::DB::News" at EoD.pm line 154."This is line 154: $row_data{'replies'} = $c->count; -- timorperfectus.com - web design to frightening perfection.One last songGiven to an Angel's SonAs soon as you we

[Dbix-class] DBIx::Class troubles with retrieving thread reply count on discussion software

2006-09-28 Thread Devin Austin
Hi everyone, I'm new to this, but I thought I'd post a question.I"m having trouble trying to retrieve the reply count to each thread in my message board software ( http://www.timorperfectus.com/users/devin/).  I've tried a few things, but this is the current code I'm trying to get to work:my $comme