PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB_DataObject » Bug #4567

count()

Details

Submitted2005-06-10 19:54 UTC
Fromraxm at yandex dot ru
Assignedalan_k
StatusClosed
PackageDB_DataObject
PHP Version4.3.11
OSwin xp
Roadmaps(Not assigned)

Comments

[2005-06-10 19:54 UTC] raxm at yandex dot ru

Description:
------------
DB_DataObject version 1.7.2

well, the bug itself better to see in code example

Reproduce code:
---------------
$stat =& DB_DataObject::factory('stat');

$stat->groupBy('OE, KodTovara, user');
$stat->orderBy('KodTovara DESC, OE DESC');

$total = $stat->count();

echo $total;

Expected result:
----------------
95

Actual result:
--------------
140 (like it was just a "select count(id) from table_name" without group by function)

[2005-06-11 11:24 UTC] raxm at yandex dot ru

I upgraded DB_DataObject to 1.7.13 version but still experiencing problems.

PS: i dont think php version will solve the problem