For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > January 2005 > Re: Joins + links on DO









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Joins + links on DO
Alan Knowles

2005-01-27, 4:00 pm

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-
>
>
>
>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
>
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com