Re: Selecting (and accessing) from many tables

[prev] [thread] [next] [Date index for 2004/09/20]

From: Jesse Sheidlower
Subject: Re: Selecting (and accessing) from many tables
Date: 12:05 on 20 Sep 2004
On Mon, Sep 20, 2004 at 08:18:24AM +0100, Tony Bowden wrote:
> On Sun, Sep 19, 2004 at 08:46:03PM -0400, Jesse Sheidlower wrote:
> > (I'd prefer to use __ESSENTIAL__ instead of table.*, which
> > gets everything, except that as mentioned I have more tables
> > involved in the query than I want results from, so it would
> > have to be something having the quality of "SELECT
> > Artist.__ESSENTIAL__, CD.__ESSENTIAL__, Track.__ESSENTIAL__
> > FROM Artist, CD, Track, Foo, Bar, Baz...", which is probably
> > not possible.)
> 
> Track->set_sql(foo => qq{
>   SELECT __ESSENTIAL(t)__, __ESSENTIAL(c)__, __ESSENTIAL(a)__
>     FROM __TABLE(=t)__, __TABLE(CD=c)__, __TABLE(Artist=a)__
>    WHERE __JOIN(t c a)__
>      AND t.id = ? 
> });

My. OK, I didn't realized it worked this way, but this is
terrific. Thanks.

When retrieving in such a manner, what is the syntax for
acessing the elements of this from my Track object? 

Thanks.

Jesse Sheidlower

(message missing)

Selecting (and accessing) from many tables
Jesse Sheidlower 00:46 on 20 Sep 2004

Re: Selecting (and accessing) from many tables
Tony Bowden 07:18 on 20 Sep 2004

Re: Selecting (and accessing) from many tables
Jesse Sheidlower 12:05 on 20 Sep 2004

Re: Selecting (and accessing) from many tables
Tony Bowden 16:47 on 20 Sep 2004

Re: Selecting (and accessing) from many tables
Jesse Sheidlower 22:55 on 20 Sep 2004

Re: Selecting (and accessing) from many tables
Tony Bowden 07:04 on 21 Sep 2004

Re: Selecting (and accessing) from many tables
Perrin Harkins 19:29 on 20 Sep 2004

Re: Selecting (and accessing) from many tables
Jesse Sheidlower 13:28 on 21 Sep 2004

Re: Selecting (and accessing) from many tables
Tony Bowden 13:56 on 21 Sep 2004

Re: Selecting (and accessing) from many tables
Jesse Sheidlower 14:05 on 21 Sep 2004

Re: Selecting (and accessing) from many tables
Tony Bowden 15:08 on 21 Sep 2004

Re: Selecting (and accessing) from many tables
Jesse Sheidlower 15:22 on 21 Sep 2004

Re: Selecting (and accessing) from many tables
Tony Bowden 15:28 on 21 Sep 2004

RE: Selecting (and accessing) from many tables
Carl Johnstone 15:42 on 21 Sep 2004

Re: Selecting (and accessing) from many tables
Perrin Harkins 16:08 on 21 Sep 2004

Generated at 11:35 on 01 Dec 2004 by mariachi v0.52