[Dbix-class] single field in resultset?

Mark Blythe list at markblythe.com
Thu Dec 6 19:38:33 GMT 2007


Michael,

See the 'columns' attribute or the 'select / as' attribute combo.  For
example:

$schema->resultset('Foo')->search(
  {  id =3D> { -in =3D> [ 1, 2, 3 ] }  },
  {  columns =3D> [ 'id', 'title' ] }
);

It's covered in more detail in the ATTRIBUTES section of the
DBIx::Class::ResultSet perldocs.  There are also some examples in
DBIx::Class::Manual::Cookbook under 'Using specific columns'.

Good luck,
Mark

On Dec 6, 2007 11:08 AM, Michael Higgins <linux at evolone.org> wrote:

> Can anyone tell me how to grab a result set that is a list of only one
> column? I see how to do %where, but not [what]..??
>
> Cheers,
>
> --
>  |\  /|        |   |          ~ ~
>  | \/ |        |---|          `|` ?
>  |    |ichael  |   |iggins    \^ /
>  michael.higgins[at]evolone[dot]org
>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive:
> http://www.grokbase.com/group/dbix-class@lists.rawmode.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20071206/4fc=
dbabc/attachment-0001.htm


More information about the DBIx-Class mailing list