On Dec 24, 2010, at 3:07 PM, Carey Gagnon wrote:
> The database field are integers
Are you constructing the SQL WHERE clause manually, based on your
users' selections? If so, let's say you have a field named 'foo' and a checkbox
with a RegID of "chkFoo". Then you can add the criteria as follows:
whereClauses = []
if self.chkFoo.Value:
whereClauses.append(" foo = 1 ")
else:
whereClauses.append(" foo = 0 ")
[repeat for all your search controls]
where = "WHERE " + " AND ".join(whereClauses)
You can also look at the code for the Search page of any
AppWizard-generated app to see how it generates the WHERE clause from the
user's selections.
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message:
http://leafe.com/archives/byMID/[email protected]