[ZPT] Re: Passing ZSQL Method an argument/variable with ZPT

Geir Bækholt Geir Bækholt
Thu, 20 Feb 2003 22:48:12 +0100


DT> Hello,

DT> After using all these below... it seems that the variable being passed is
DT> still not going through.

DT> <select name="result" size="10" tal:define="jobclasses
DT> python:here.get_id(my_id=request.form['id'])">

DT> The ZSQL method is: get_id

DT> SELECT job_id FROM inventory WHERE (my_id = <dtml-sqlvar my_id
DT> type="string">

Does the ZSQL method have the parameter my_id defined ?

DT> Is this because of the variable being a particular typecast, like integer
DT> vs. string?  (I am using zope 2.5.0 on a red hat linux box).

in your database, "my_id" has to be a string column to match.

Do you get an error message when it fails ?

--
Geir Bækholt