gottit! thanks.

On 6/17/07, Dagfinn Ilmari Mannsåker <[EMAIL PROTECTED]> wrote:
"Daniel McBrearty" <[EMAIL PROTECTED]> writes:

> table has two integer columns:
>
> id1 INTEGER,
> id2 INTEGER
>
> sql query:
>
> SELECT COUNT(*) FROM table WHERE id1 = id2;
>
> how do I do this in dbix?

my $count = $schema->resultset('Table')->search({ id1 => \'= id2' })->count;

--
ilmari
"A disappointingly low fraction of the human race is,
 at any given time, on fire." - Stig Sandbeck Mathisen


_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/



--
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com
danmcb.vox.com
danmcb.blogger.com
BTW : 0873928131

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to