[ZPT] Passing ZSQL Method an argument/variable with ZPT
Daniel Tang
daniel.tang@chronicle.com
Thu, 20 Feb 2003 16:01:32 -0500 (EST)
Hello,
I am trying to send an argument to an SQL Method in my expression below,
but to no avail. I've tried numerous ways to include the variable which
is passed in by a form. Is there something wrong with this?
Page template:
<select name="result" size="10" tal:define="options container/get_id(my_id={request.form['id']})">
<option tal:repeat="option options"
tal:attributes="value option/job_id"
tal:content="option/job_id">job_id</option>
</select>
SQL Method:
Arguments: my_id
SELECT job_id FROM inventory WHERE (my_id = <dtml-sqlvar my_id type="string">
I get an error on trying to get the results. Any ideas?
TIA,
Daniel