----- Original Message ----- From: "Dieter Maurer" <dieter@handshake.de> To: "Tim Hicks" <tim.hicks@iname.com> Sent: Tuesday, July 18, 2000 9:51 PM Subject: Re: [Zope] <dtml-if> errors in sql method
Tim Hicks writes:
<dtml-if "which_table == 'Plays'">
SELECT * FROM <dtml-var which_table> WHERE "Play title" like <dtml-sqlvar "'%'+_.string.strip(form_string)+'%'" type=string>;
Can anybody explain to me what is going on with my zsql method? Zope gives me the following error when I try and change my method to what is above.
Invalid attribute name, "which_table", for tag <dtml-if "which_table == 'Plays'">, on line 16 of <string> The error message looks strange. It seems that the parser does not see the "...", because "which_table" actually is not an attribute at all.
Did you declare "which_table" as argument of the Z SQL method. This will probably not remove your current problem but may later come up.
Dieter
Yes, which_table and form_string are both declared as arguments in the zsql method. Tim: tim.hicks@iname.com