Home » Database » DB_DataObject » Bug #1579
Possible error with two table links and count request
Details
| Submitted | 2004-06-08 11:27 UTC |
|---|---|
| From | contact at mann dot fr |
| Status | No Feedback |
| Package | DB_DataObject |
| PHP Version | 4.3.4 |
| OS | Linux (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