problem solved--Re: [Zope] question about forms and zsql

Robert Hood, Ph.D. rhood@mtsu.edu
Tue, 12 Feb 2002 11:26:54 -0600


Thanks for the help!

Tom P wrote:
 >You don't need to go to a python script. Instead, include a input element
 >in your form to hold the search phrase. Say you name that input field
 >"searchphrase". Then in your zsql method, you write something like
 >select * from table where name like '%&dtml-searchphrase;%'

YES--all I had to do was make some minor changes to my zsql and it now 
works, and thankfully, no scripting, like so:

SELECT * FROM Courses
WHERE (CourseName LIKE '%&dtml-CourseName;%' OR
SemesterTaught LIKE '%&dtml-SemesterTaught;%' OR
CourseType = <dtml-sqlvar CourseType type=string>);

Robert