Martin Jennings wrote:
Firstly, thank you to those who answered by query on the empty result set,
it set me on the way to finding a solution.

Not sure if this is the right list to ask on, but here is the question.

I have got information from a ZSQL request in a result set and I want to
use one of the values as a parameter in a hyperlink, how do I do this?

I.e. <a href="htmlPage?parameter=ZSQLValue">my link<a>

How do I write the code for this?

It depends on how you are calling the ZSQL Method, and whether you are returning one result or many. In DTML it could be like this:

<dtml-in nameOfZSQLMethod>
<a href="htmlPage?parameter=<dtml-var FieldName>"><dtml-var FieldNameOfLinkText><a><br>

You can shorten <dtml-var FieldName> to &dtml-FieldName; - but I thin you should get the idea.

Python uses
for result in context.nameOfZSQLMethod():
    return '<a href="htmlpage?parameter=%s">Link Text</a>' % \



Thank you in advance, and once again, sorry if this is not the correct list.

Martin Jennings

Zope-DB mailing list
Zope-DB mailing list

Reply via email to