[Zope-DB] Text in Query Question
Fri, 27 Jun 2003 19:54:01 +0200
On 2003-06-27 at 02:41:55 [+0200], Rima Gerhard wrote:
> Hi all,
> sorry for the lame subject line, but I really didn't know how to express
> my problems in just a few words. Here is what I was wondering: it is
> pretty often the case that one stores text inside a table, which is then
> displayed on a website. Now what happens if inside of that text I would
> like to insert another query? Say that I have a table called "artshows"
> which has a column description. In the description, I want to query
> another table and insert something like
> "The artshow is taking place at <span tal:repeat="in
> python:root.selectLocation(art_id='23')"><a href="link"
> tal:attributes="href in/linktowebpage">location</a></span>.
> Right now, the query inside of the columns doesn't get executed by Zope.
> Does anyone have any idea how to work around this problem? Thanks!!
Apart from quoting problems, why on earth would you want to do this? This
seems to be just asking for all kinds of problems. It makes absolutely no
sense at all to store relations in fields within an RDBMS because this is
what the RDBMS does for you. A little extra work: add a relation and
generate the link via tal:content string and you'll have a safer and much
more flexible result.