<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.0.10">
</HEAD>
<BODY>
<BR>
&nbsp; Hi,<BR>
<BR>
I think that I already made this kind of thing working with a simple :<BR>
<BR>
<PRE>&nbsp; &lt;dtml-in &quot;findResults(REQUEST.form)&quot;&gt;
&nbsp; ...
&nbsp; &lt;/dtml-in&gt;
</PRE>
(if &quot;findResults&quot; is the name of your ZSQLMethod component...)<BR>
<BR>
<BR>
Thierry<BR>
<BR>
<BR>
<BR>
On Tue, 2004-10-19 at 18:11, Laura McCord wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE><FONT COLOR="#40a3c5"><I>Ok. I redesigned my zsql method to be much simpler:

 select * from host
 &lt;dtml-sqlgroup where&gt;
  &lt;dtml-sqltest name=&quot;location1&quot; column=&quot;site&quot; type=&quot;nb&quot; optional&gt;
   &lt;dtml-or&gt;
    &lt;dtml-sqltest name=&quot;location2&quot; column=&quot;site&quot; type=&quot;nb&quot; optional&gt;
   &lt;dtml-or&gt;
    &lt;dtml-sqltest name=&quot;location3&quot; column=&quot;site&quot; type=&quot;nb&quot; optional&gt;
   &lt;dtml-and&gt;
  &lt;dtml-sqlgroup&gt;
   &lt;dtml-sqltest name=&quot;usetype1&quot; column=&quot;UseType&quot; type=&quot;nb&quot; optional&gt;
   &lt;dtml-or&gt;
    &lt;dtml-sqltest name=&quot;usetype2&quot; column=&quot;UseType&quot; type=&quot;nb&quot; optional&gt;
    &lt;dtml-or&gt;
     &lt;dtml-sqltest name=&quot;usetype3&quot; column=&quot;UseType&quot; type=&quot;nb&quot; optional&gt;
   &lt;/dtml-sqlgroup&gt;
  &lt;dtml-and&gt;
   &lt;dtml-sqltest name=&quot;active&quot; column=&quot;Active_Inactive&quot; type=&quot;int&quot;
optional&gt;
&lt;/dtml-sqlgroup&gt;

My form is a combination of checkboxes:
   &lt;form action=&quot;resultsPage&quot;&gt;
    &lt;table&gt;
    &lt;tr&gt;
    &lt;td&gt;Select any of the following combinations:&lt;/td&gt;
    &lt;/tr&gt;
    &lt;/table&gt;
    &lt;table&gt;
    &lt;tr&gt;
    &lt;td&gt;Active:&lt;/td&gt;
    &lt;td&gt;&lt;input type=&quot;checkbox&quot; name=&quot;active&quot; value=&quot;1&quot;
checked=&quot;checked&quot;&gt;Active&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
    &lt;td&gt;Site:&lt;/td&gt;
    &lt;td&gt;&lt;input type=&quot;checkbox&quot; name=&quot;location1&quot; value=&quot;aus&quot;&gt;Austin &lt;/td&gt;
    &lt;td&gt;&lt;input type=&quot;checkbox&quot; name=&quot;location2&quot;
value=&quot;ca&quot;&gt;California&lt;/td&gt;
    &lt;td&gt;&lt;input type=&quot;checkbox&quot; name=&quot;location3&quot;
value=&quot;mass&quot;&gt;Massachusetts&lt;/td&gt;    
    &lt;/tr&gt;
    &lt;tr&gt;
    &lt;td&gt;UseType:&lt;/td&gt;
    &lt;td&gt;&lt;input type=&quot;checkbox&quot; name=&quot;usetype1&quot;
value=&quot;server&quot;&gt;Server&lt;/td&gt;
    &lt;td&gt;&lt;input type=&quot;checkbox&quot; name=&quot;usetype2&quot; value=&quot;cad&quot;&gt; CAD&lt;/td&gt;
    &lt;td&gt;&lt;input type=&quot;checkbox&quot; name=&quot;usetype3&quot; value=&quot;base&quot;&gt;Base&lt;/td&gt;
    &lt;/tr&gt; 
    &lt;tr&gt;
    &lt;td&gt;&lt;span&gt;&lt;input type=&quot;submit&quot; class=&quot;submitLink&quot;
value=&quot;save&quot;&gt;&lt;/span&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;/table&gt;
   &lt;/form&gt;

The only problem I am having is bridging the two in order to get my
results. I have a dtml method that I am trying to process the zsql
method but I don't think I am doing it correctly.

&lt;dtml-call expr=&quot;findResults(location1=location1, ...,
usetype1=usetype1, ...,active=active)&quot;&gt;

 But, with the above if location2 or any of the boxes are not selected I
am getting an error that they are not defined. How do I correct this
problem?

Thanks You.
_______________________________________________
Zope maillist  -  Zope@zope.org</FONT>
<A HREF="http://mail.zope.org/mailman/listinfo/zope"><U>http://mail.zope.org/mailman/listinfo/zope</U></A>
<FONT COLOR="#40a3c5">**   No cross posts or HTML encoding!  **
(Related lists - 
 </FONT><A HREF="http://mail.zope.org/mailman/listinfo/zope-announce"><U>http://mail.zope.org/mailman/listinfo/zope-announce</U></A>
<FONT COLOR="#40a3c5"> </FONT><A HREF="http://mail.zope.org/mailman/listinfo/zope-dev"><U>http://mail.zope.org/mailman/listinfo/zope-dev</U></A><FONT COLOR="#40a3c5"> )</I></FONT></PRE>
</BLOCKQUOTE>
</BODY>
</HTML>