[Zope] Unquoting a string.

Ron Bickers rbickers@logicetc.com
Fri, 7 Jul 2000 13:40:31 -0400


dtml-sqlvar does quoting of strings to aid in placing them in SQL queries.

Use just <dtml-var resp> instead of <dtml-sqlvar ...>

_______________________

Ron Bickers
Logic Etc, Inc.
rbickers@logicetc.com


> -----Original Message-----
> From: gh@gowanus.com [mailto:gh@gowanus.com]On Behalf Of Gregory Haley
> Sent: Friday, July 07, 2000 11:36 AM
> To: Zope
> Subject: [Zope] Unquoting a string.
> 
> 
> Hi,
> 
> I am trying to pass a column id through a ZMySQL method
> call.  The thing looks like this:
> 
> UPDATE venapoll 
>   SET <dtml-sqlvar resp type=string> = last_insert_id(+1)
> WHERE poll_num = 3;
> 
> where resp is a value passed in by a dtml method and can
> have the value of resp0, resp1, resp3, etc.  These are the
> names of columns.  Zope is blowing chuncks, because the
> parsed call is actually:
> 
>   SET 'resp1' = last_insert_id(+1)
> 
> and ZMySQL needs to have the value passed in as 
> 
>   SET resp1 = . . .
> 
> (i.e., without the quotes).
> 
> Has anyone had a problem with this?