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
=> $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
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
;
>> 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
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 $
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',
],
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
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
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
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
10 matches
Mail list logo