Re: Joins + links on DO
| From: | Alan Knowles | Date: | Thu, 27 Jan 2005 14:36:37 +0000 |
| Subject: | Re: Joins + links on DO | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-17206@lists.php.net to get a copy of this message | ||
I think the introduction in the manual says something about manual joins may be quicker than joinAdd(), although selectAs() in DB_DataObject does solve alot of the last selectAdd() issues.
Regards
Alan
daniel@electroteque.org wrote:
Here is my final join tedious isnt it ? I was thinking of a parser of normal sql :| $this->selectAdd(); $division = MDB2_DataObject::factory('division'); $users = MDB2_DataObject::factory('users'); $users->joinAdd($division,'INNER','d'); $this->joinAdd($users,'INNER','users','userID'); $complainant = MDB2_DataObject::factory('complainant'); $this->joinAdd($complainant,'INNER','c'); $this-selectAdd('complaintID,file_number,date_received,users.realname,c.complainant,d.division');I had to change the alias of users from u back to users because of the division join was trying tofind users unless there is a way to use the alias as the join rather than the table ? Bug IMHO