[Dbix-class] DBIx::Class troubles with retrieving thread reply count on discussion software
Devin Austin
devin.austin at gmail.com
Fri Sep 29 08:02:26 CEST 2006
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 $comments {
replyid => 0
},
{
rows => 3,
page => scalar $q->param('page') || 1,
order_by => 'date DESC'
}
);
## let's get the comments
for ( $comments->all ) {
my $count {
replyid => $_->postid
},
{
select => [
{
count => '*'
}
],
as => [ 'count' ]
}
);
my $c
my %row_data;
$row_data{'post_subject'} $row_data{'post_author'} $row_data{'post_date'} $row_data{'post_id'} $row_data{'post_content'} $row_data{'replies'} #$row_data{'is_hidden'}
# push it into the the loop....
push ( @end_posts, \%row_data );
}
If this is too much code to look at let me know and I'll trim it
down...anyone have any ideas? Do you need to see my schema?
Thanks!
-devin
--
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://lists.rawmode.org/pipermail/dbix-class/attachments/20060929/dfc9fa31/attachment.htm
More information about the Dbix-class
mailing list