[Dbix-class] (no subject)
dreel at bk.ru
dreel at bk.ru
Thu Sep 27 19:37:33 GMT 2007
Çäðàâñòâóéòå, Will.
Âû ïèñàëè 27 ñåíòÿáðÿ 2007 ã., 22:11:43:
WS> Hi,
WS> I do a count on number of records in a table, and strangely,
WS> the returned number is always less than the real number, just
WS> wonder why is that? I tried with different tables, with some
WS> tables, if the number is small like 2 or 3, it returns right.
WS> my $rs = $c->model('myappDB::Hotel')->search(undef, {count => 'HotelName'});
WS> Thanks
WS> Boardwalk for $500? In 2007? Ha!
WS> Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
Try to do
my $rs = $c->model('myappDB::Hotel')->search(
{}, {count => 'HotelName'});
or
my $rs = $c->model('myappDB::Hotel')->search();
my $count = $rs->count;
It's will be better if you write your DBIx-Class version and using
database.
--
Mistakeos,
dreel mailto:dreel at bk.ru
More information about the DBIx-Class
mailing list