[Zope] Tree tag and SQL methods?
Alexander Staubo
alex@mop.no
Sun, 27 Jun 1999 19:21:22 +0200
No offense taken -- yes, of course I have tested it. :-)
I have not tested using the #tree tag with the second output though, but
that would meaningless (the second output should be rendered as leaf
nodes). I even tried having the second query output _all_ data in the
table, to no avail. Here's my query:
<!--#if "pb == ''"-->
select distinct publication, count(publication) as pub_cnt
from articles
where publication != ''
group by publication
order by publication
<!--#else-->
select title
from articles
where publication = <!--#sqlvar pb type=string-->
<!--#/if-->
Here, pb is the publication argument. I assure you, the second part of
the query does execute correctly.
--
Alexander Staubo http://www.mop.no/~alex/
"`This must be Thursday,' said Arthur to himself, sinking low over
his beer, `I never could get the hang of Thursdays.'"
--Douglas Adams, _The Hitchhiker's Guide to the Galaxy_
>-----Original Message-----
>From: Phillip J. Eby [mailto:pje@telecommunity.com]
>Sent: 27. juni 1999 18:07
>To: Alexander Staubo; Zope Mailing List (E-mail)
>Subject: RE: [Zope] Tree tag and SQL methods?
>
>
>Don't be offended by this suggestion, but, have you tried
>having the tree
>print out all the variables that would affect the 'second'
>query, and then
>plugging them into manage_test of the query? My guess is
>you'll find that
>there's something you've overlooked as far as how output of
>the first query
>gets fed into the second, or else the second is just plain wrong.
>
>At 03:36 PM 6/26/99 +0200, Alexander Staubo wrote:
>>Doesn't improve anything: While the "second" part of the query -- the
>>one that's supposed to collect the leaf articles -- clearly
>executes, no
>>data is displayed. Only the first level -- the publications list -- is
>>rendered, with "plus" icons. Clicking on the icon runs the
>query but no
>>data is there.
>>
>