[Dbix-class] list 2 columns for all records in table not working
Rajeev Prasad
rp.neuli at yahoo.com
Tue Oct 16 23:27:50 GMT 2012
this straight lift from documentation is not working. what could i be doing wrong?
my @all_artists = $schema->resultset('Artist')->search(undef, { columns => [qw/name artistid/], });
my query is:
my @items = $schema->resultset('Itemlist')->search(
undef, #no search condition means all records
{ select => [qw/itemid item/] }
);
print @items;
the output is count of rows in the table, and not the data requested. when i try to print the array via this loop:
foreach (@items) { print "$_\n";
}I get this output...
Itemdb::Schema::Result::Itemlist=HASH(0x90c7000)
Itemdb::Schema::Result::Itemlist=HASH(0x90c73a0)
Itemdb::Schema::Result::Itemlist=HASH(0x90c7190)
Itemdb::Schema::Result::Itemlist=HASH(0x90c70f0)
Itemdb::Schema::Result::Itemlist=HASH(0x90c6f60)
Itemdb::Schema::Result::Itemlist=HASH(0x90c27a0)
.....
ty.
Rajeev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20121016/b2f66bfe/attachment.htm
More information about the DBIx-Class
mailing list