"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]/