PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB_DataObject » Bug #1579

Possible error with two table links and count request

Details

Submitted2004-06-08 11:27 UTC
Fromcontact at mann dot fr
StatusNo Feedback
PackageDB_DataObject
PHP Version4.3.4
OSLinux (Debian i586)
Roadmaps(Not assigned)

Comments

[2004-06-08 11:27 UTC] contact at mann dot fr

Description:
------------
When three tables are dynamically linked,
an attribute is entered
and a count() method is called
there may be a problem
Houston

Reproduce code:
---------------
$doChild = & new DataObjectChild();
$doFriend = & new DataObjectFriend();
$doTeacher = & new DataObjectTeacher();
$doChild->grade = 5;
$doChild->selectAdd();
$doChild->selectAdd("child_id,child_name");
$doChild->orderBy("child_name DESC");
$doChild->joinAdd($doTeacher,"LEFT",false,"teacher_id");
$doChild->joinAdd($doFriend,"LEFT",false,"friend_id");
$nbChildren = $doChild->count();

Expected result:
----------------
$nbChildren == {the number of children in the children table}

Actual result:
--------------
false, no error