On Fri, 27 Apr 2007, Octavian Rasnita wrote:

From: "Jess Robinson" <[EMAIL PROTECTED]>

>  Is it possible to do
>  select a, b, c from table_name
>  union select a, b, c from table2_name
> > using DBIx::Class? > > Thanks.
>


 Yes, it is.

 Jess

And where can I read how to do it?

I have searched for "union" in more POD docs but I couldn't find that word.



You have to cheat a little:

  ->search({},
           { -order_by => \'col UNION ALL SELECT 1,2,3 FROM othertable' }
          );

.. just add it in a scalar ref to whichever your last attribute is (last SQL-wise that is)

Jess


_______________________________________________
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