ZSQL with REQUEST and named arguments
Hello, my ZSQL method has several arguments. Some values will be provided via the REQUEST object and some do I want to hardcode in the method call. REQUEST will have a key 'name' (which is the name I want to retrieve from the database) and I want to search only in zip area "50xxx". <dtml-let results="sql.address(_.None,_,zip='50%')"> If I use this call the name from REQUEST.name will never be used by the ZSQL method. If I do <dtml-call "REQUEST.set('zip', '50%')"> <dtml-let results="sql.address(_.None,_)"> Everything works fine. Any ideas? How can I make this work without the dtml-call statements (seems ugly to me). Thanks Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06
Ulrich Wisser writes:
my ZSQL method has several arguments. Some values will be provided via the REQUEST object and some do I want to hardcode in the method call. REQUEST will have a key 'name' You want but Z SQL Methods do not support it.
You have two options: pass all arguments explicitly as keyword arguments (even the ones from REQUEST. Put the keyword arguments into REQUEST (with "REQUEST.set(name,value)"). Dieter
participants (2)
-
Dieter Maurer -
Ulrich Wisser