[Zope] Putting a <dtml-in> tag into a <dtml-in> tag

Tim Hicks Tim Hicks" <tim@sitefusion.co.uk
Thu, 5 Apr 2001 13:44:58 +0100


----- Original Message -----
From: "Gitte Wange" <gitte@mmmanager.org>
To: "Tim Hicks" <tim@sitefusion.co.uk>
Cc: <zope@zope.org>
Sent: Thursday, April 05, 2001 1:32 PM
Subject: Re: [Zope] Putting a <dtml-in> tag into a <dtml-in> tag


> On 05 Apr 2001 13:22:31 +0100, Tim Hicks wrote:
> >
> > ----- Original Message -----
> > From: "Gitte Wange" <gitte@mmmanager.org>
> > To: <zope@zope.org>
> > Sent: Thursday, April 05, 2001 1:08 PM
> > Subject: [Zope] Putting a <dtml-in> tag into a <dtml-in> tag
> >
> >
> > > Hmmm confusing subject :-)
> > >
> > > What I need to do is this:
> > > Get some data out of my database (in a <dtml-in> tag)
> > > While iterating through this data, I need to get some more data out
out
> > > my database (another <dtml-in> tag.
> > > I tried to call the second sql method with a <dtml-var> from the first
> > > sql method but I get an error.
> > >
> > > So how do I collect some data from my database with a result from the
> > > first sql method ?
> > >
> >
> > Wouldn't it be easier to put all the 'data collection' within one zsql
> > method?
> >
> > tim
>
> Well I just thought of that :-)
>
> But actually I don't know how.
> Maybe someone here could help.
> I need to this this:
> First select all clips that belongs to a playlist from the playlist
> table (clips is identified by clipid's)
> Then select the specific clip-data from the clip table from the clipid
>

I'm not that great at sql, but I think you just want to use a 'join'.
http://www.google.com/search?q=%2Bsql+%2Btutorial+%2Bjoin turns up fair
number of tutorials that detail how to do this, but depending on which
database you are using, I think the syntax may be slightly different.

tim