[Zope-dev] SQL compare to form value -HELP-

Sean Kelley sean@horse101.com
Sat, 09 Mar 2002 16:38:24 -0800


I am trying to test whether or not 3 SQL fields are equal to a form
field.  I am doing this within an SQL method.  (I am trying to learn
zope and Mysql at the sam time) How does one do this?  Here is where I
am going with this so far:
I have these listed as arguments: Breeds Breed1 Breed2 Breed3

SELECT * from Ranch
WHERE Breeds = <dtml-sqltest name="Breed1" type="string"> OR Breeds =
<dtml-sqltest name="Breed2" type="string">
or Breeds = <dtml-sqltest name="Breed3" type="string">

Breeds is the name of the form input and I want to test and see if it
equals any one of the 3 fields Breed1, Breed2, or Breed3 and return all
of the row if there is a match.

--
Sean