Re: DB_DataObject joining, sorting and ambiguous field name
| From: | Justin Patrin | Date: | Mon, 07 Nov 2005 15:38:07 +0000 |
| Subject: | Re: DB_DataObject joining, sorting and ambiguous field name | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-40394@lists.php.net to get a copy of this message | ||
On 11/7/05, Alessandro Pasotti <ale.pas@tiscali.it> wrote:
> Il 03:50, mercoledì 02 novembre 2005, Alan Knowles ha scritto:
> > The * is the for backward compatibility, removing/replacing it would
> > probably break to many things.
> > Regards
> > Alan
> >
> > On Tue, 2005-11-01 at 22:49 +0100, Olivier Guilyardi wrote:
> > > Alan Knowles wrote:
> > > > On Mon, 2005-10-31 at 19:54 +0100, Olivier Guilyardi wrote:
> > > >>Allessandro Pasotti has reported problems with sorting, when using
> > > >>Structures_DataGrid over joined DataObjects.
> > > >>
> > > >>I have tried to do such configuration using the
> > > >> DB_DataObject::selectAs() method, but it failed :
> > > >>- both my tables have a 'name' field
> > > >
> > > > issue this, beforehand.
> > > > $do1->selectAs();
> > > > - it removes the *,l and replaces it with all the real table column
> > > > names.
> > >
> > > That works. Thanks. But why not using real column names by default
> > > instead of "*" ? If it helps MySQL ensuring the column names are not
> > > ambiguous...
> > >
> > > --
> > > og
>
> Well, I examined your solution, but I don't think is an option for me: all
> joins are built from formbuilder (integration), I cannot know which joins
> were built since they depends on the links.ini file (of course I have a
> single routine for all my 80+ lists).
>
FormBuilder doesn't join. It runs a new query for each link.
> If is it not possible to integrate my patch (and maybe it could break things
> in other places) I will live with my patch installed locally.
>
--
Justin Patrin