Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Perform addition of data from rows

by PerlSufi (Friar)
on Jul 14, 2014 at 20:38 UTC ( [id://1093617]=note: print w/replies, xml ) Need Help??


in reply to Perform addition of data from rows

I would look into using DBIx::Class to count a particular column.
use strict; use warnings; use DBIx::Class; my $rs = $schema->resultset('YOURTABLENAMEHERE')->search( {}, { columns => [ qw/name/ ], distinct => 1 } ); my $count = $rs->count;
That was basically straight from here: https://metacpan.org/pod/distribution/DBIx-Class/lib/DBIx/Class/Manual/Cookbook.pod

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1093617]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 12:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found