[Dbix-class] sql function in left side of where
Ulrich Leodolter
ulrich.leodolter at univie.ac.at
Sat Feb 10 13:03:09 GMT 2007
found solution myself, but not sure if this is the best way.
$source->resultset('MyTable')->search({ 'YEAR( date )' => $year });
On Sat, 2007-02-10 at 13:37 +0100, Ulrich Leodolter wrote:
> hello
>
> i've read DBIx::C:Manual and SQL::Abstract, but
> found now answer how to make a ResultSet search
> for the following sql query:
>
> SELECT date FROM my_table WHERE YEAR( date ) = ?
>
> thanks
> ul
>
>
>
>
> _______________________________________________
> 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/dbix-class@lists.rawmode.org/
More information about the Dbix-class
mailing list