[Dbix-class] [DBIx::Class] using count/distinct

Daniel McBrearty danielmcbrearty at gmail.com
Fri Jan 5 10:51:25 GMT 2007


I'm reading the POD at

http://search.cpan.org/~bricas/DBIx-Class-0.07003/lib/DBIx/Class/ResultSet.pm#count

but not really getting it, or whether it's what I want to solve this
particluar case.

I have a table :

Phrases

id INT PK
orig_id REFERENCES id
languuage_id REFERENCES languages.id

Now what I want to do is count the number of phrases in the table that
have a given language, but for which the orig_id is distinct.

How would I write such a query in DBIx ?

Thanks

Daniel



-- 
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainer
BTW : 0873928131



More information about the Dbix-class mailing list