[Zope] passing value to sql method question

Kelley, Sean SKelley@ci.santa-rosa.ca.us
Tue, 25 Jun 2002 10:31:21 -0700

Thanks- this worked perfectly!
<dtml-in expr="get_record(PermitNumber=PermitNumber)">

Subject: RE: [Zope] passing value to sql method question
Hi Sean
You are correct that you are inside the speech marks (""), you have to talk
python rather than DTML. What you really want is:
<dtml-in expr="get_record(PermitNumber=PermitNumber)">

Or if this is a ZSQL then it's even simpler:
Just call it like:
<dtml-in get_record>

Subject: [Zope] passing value to sql method question
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