hello,

I have this "host" table, which has all unique records. So i want to get a 
specific column value for a specific host. i am doing below, but i think it is 
not efficient. is there a better way?

my $hostAdd_rs = 
$schema->resultset('Host')->search({host=>$host},{select=>[qw/addr/]});
while (my $rec = $hostAdd_rs-next() ) {
    $hostAdd = $rec->get_column('addr');
}


can we not do it in a single line command? without any while loop?

i tried, but getting various errors.

ty.
Rajeev


_______________________________________________
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.scsys.co.uk

Reply via email to