Hello This is an example of exUserFolder, it should also work for your problem: Arguments: table=adressen usernameColumn=dbusername username:string SQL: DELETE FROM <dtml-var table> where <dtml-var usernameColumn>=<dtml-sqlvar username type=string> --- Mit freundlichen GrĂ¼ssen - Meilleures salutations - Kind regards - Cordiali saluti Dieter Fischer Grid IT GmbH Im Niederholzboden 24 CH-4125 Riehen Tel: +41 61 601 29 62 mailto:dieter.fischer@grid-it.ch http://:www.grid-it.ch
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Eugen Nedelcu Sent: Thursday, January 30, 2003 1:05 PM To: martin f krafft Cc: zope@zope.org Subject: Re: [Zope] Re: dynamic sql query
On Thu, Jan 30, 2003 at 12:51:39PM +0100, martin f krafft wrote:
first, shouldn't you be using dmtl-sqlvar? and second, i think the problem is that dtml-var returns a string, which is single-quoted. you'll need to fine a type="" argument for dtml-sqlvar that renders unquoted characters.
I don't think you understand my problem... I need to pass this arguments to my zsql method:
1. database - string - the name of the database 2. table - string - the name of the table 3. pri - string - the name of the primary_key column 4. tuple_pri - tuple - a tuple with primary_keys of the rows which will be deleted.
In sql the query would be (i.e):
delete from test.test where id in (1,3,7,9)
A zsql method like this:
delete from <dtml-var database>.<dtml-var table> where <dtml-sqltest id type=nb op=eq multiple>
will work if the name of the primary_key is id, but I want to pass that column name myself.
Hope that this make things more clear. Best regards.
-- ICQ: 165549179
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )