[Zope] passing value to sql method question

Kelley, Sean SKelley@ci.santa-rosa.ca.us
Mon, 24 Jun 2002 16:33:14 -0700

Learning dtml and zope...

I am trying to call an sql method called get_record and pass a parameter to
it.  This works if I hardcode the value into the dtml method like this:
<dtml-in expr="get_record(PermitNumber=12345)"> 

The above line is in a dtml method called edit_dtml
So I want to call edit_dtml from an html document like this:
<a href="edit_dtml?PermitNumber=<dtml-var PermitNumber>"> <dtml-var Company

The value of PermitNumber gets passed okay and can be displayed in the
called page (edit_dtml) with:
<dtml-var PermitNumber>

But I need to plug it into the dtml-in expresssion something like this:
<dtml-in expr="get_record(PermitNumber=<dtml-var PermitNumber>)">

But this generates a syntax error.  There must be a correct way to do this.
Any ideas on how else I might do it?
I assume that the part after expr=" must be python code and this is why this
does not work ??

Sean Kelley
Technology Coordinator
City of Santa Rosa