After reading about the <dtml-sqlgroup> tag and trying several arrangements, I am confused how it works. Here's the problem: Suppose I have a ZSQL method called 'list_employees' as follows: Arguments: id lastname select employee_id, firstname, lastname from employees <dtml-sqlgroup where> <dtml-sqltest employee_id optional type=int> <dtml-or> <dtml-sqltest lastname optional type=nb> </dtml-sqlgroup> Suppose also that I have a dtml method called 'mydtml' as follows: <dtml-var standard_html_header> <dtml-in list_employees> <dtml-var employee_id> = <dtml-var lastname>, <dtml-var firstname><br> </dtml-in> By the ZSQL guide, I would expect that I could call the dtml method in any of the following ways and get the desired result: http://myzope/some/folder/mydtml <<This should list all employees>> http://myzope/some/folder/mydtml?employee_id=5 <<This should list employee number 5>> http://myzope/some/folder/mydtml?lastname=Smith <<This should list all employees w/ lastname Smith>> However, none of these work. In each case, I get a 'Bad Request' error for one or both of the arguments. If I do not put 'id' and 'lastname' in the arguments list for the ZSQL method, then for any request, I get the full list of employees. According to the ZSQL Guide, that is because optional sqltest variables that are not listed in the 'Arguments' list are sought from properties in the current folder. Any hints on how I can achieve the desired functionality? Thanks, Chuck Burdick Web Administrator / Developer Trading Technologies, Inc. chuck.burdick@tradingtechnologies.com (847) 424-8844
participants (1)
-
Chuck Burdick (TT)