[Zope] passing positional paramaters

Cliff Ford Cliff.Ford at ed.ac.uk
Thu Mar 10 17:11:58 EST 2005


It is not clear to me why you would pass None parameters to a select 
query. Typically your query would have named arguments (name and 
doclang) like this:

select * from yourTable where name=<dtml-sqlvar name type=string>
and doclang=<dtml-sqlvar doclang type=string>

Leave out the last line if you don't want to select and doclang.

Then call the query like this:

<dtml-in expr="gettransdoc(name=name,doclang=doclang)">
<dtml-var ordering> <dtml-var content><br>
</dtml-in>

Cliff

Ivan Stout wrote:
> Greetings. I am trying to create an open source communal translation
> zope product thingy and have run into a snag. I had everything
> working, but then I realized that I needed to distinguish between what
> the language that the original document bein translated was in, which
> required passing an additional paramater to my query to gadfly. Well,
> this supposedly "broke the paramater chain" requiring me to explicitly
> add positional paramaters. The problem is, though I no longer get an
> error, no results are returned from my table. The paramaters are
> filtering the query, so I believe that my values are getting altered
> in some way that is causing them to not match anything. Here is what I
> suspect is causing me trouble . . .(the "----------------->" part):
> 
> <dtml-var name><br>
> <dtml-var doclang>
> <form action="parsegettranslation.py" method="get">
> -----------> <dtml-in
> expr="gettransdoc(_.None,_,name='name',doclang='doclang')">
>  <br>
>  <dtml-var ordering> <dtml-var content>
>  <br>
> 
> Thanks!
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )


More information about the Zope mailing list