Re: [Zope] SQL method: Trying to be too clever?
Is it possible to pass a variable into anything other than the values of a SQL method? I'm trying to pass a parameter to a method, such that the param is used to define which field is affected by the action:
The only thing is you'll have to define the param in your sql method definition. In this case this would be field, besides storytitle and value.
insert into related (rootstory, <dtml-sqlvar field>)
in that case you just want a <dtml-var field> (you not passing it as sql query values)
values (<dtml-sqlvar storytitle>, <dtml-sqlvar value>)
Possible? This doesn't work, of course...
hth Rik
Andy, An error message / traceback would be useful ;-) Rik Hoekstra wrote:
insert into related (rootstory, <dtml-sqlvar field>)
in that case you just want a <dtml-var field> (you not passing it as sql query values)
Nope, the <dtml-sqlvar field> is for quoting use in SQL statements, kindof like <dtml-var field sql_quote> which I think may be even be correct syntax... cheers, Chris
Message-ID: <EXECMAIL.1000630162132.T@kosh.bris.ac.uk> Priority: NORMAL X-Mailer: Execmail for Win32 5.1 Build (9) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii"
in that case you just want a <dtml-var field> (you not passing it as sql query values)
Perfecto. That's two today. My turn to get the beers. AndyG
participants (3)
-
Andy Gates -
Chris Withers -
Rik Hoekstra