[Zope-DB] MySQL Database Search in Zope

Laura McCord Laura.McCord at doucet-austin.com
Tue Apr 20 08:59:48 EDT 2004


This is what I did to get my search interface form working. I first
created a search query such as this one that searches for user
information based on either the name of the user or it searches all
users in a given office. I built it by using a Z SQL Method:

Select * from users
 Where ( (<dtml-sqltest name="username" type="string"> OR
         <dtml-sqltest name="useroffice" type="string">))


Then, in the same folder that I created the Z SQL Method I selected the
Z Search Interface from the Drop Down Menu. Finally, you need to insert
the necessary content in the fields. Such as, highlight the query you
are using in the menu options where it states, "Select one or more
searchable objects". In my case, I highlighted 'SearchUsers'. Then give
insert a name for the report id and search input id (any name you want).
At the bottom I wanted to generate Page templates so I selected this
option. And that's it. All Done.


Hope This Helps,
 Laura

-----Original Message-----
From: zope-db-bounces at zope.org [mailto:zope-db-bounces at zope.org] On
Behalf Of Charlie Clark
Sent: Tuesday, April 20, 2004 5:22 AM
To: Rajeev Sharma
Cc: zope-db at zope.org; Andreas Jung
Subject: Re: [Zope-DB] MySQL Database Search in Zope



On 2004-04-19 at 14:23:22 [+0200], Rajeev Sharma wrote:
> Very Right, and i want help for the same .
> I am not a zope expert and need suggestion.
> I am mentioning my requirement again ..
> 
> Want to add a search form in my zope-site to search this database.

Your request is not very clear.

What is the precise problem?

It is easy to add a search interface in Zope. First of all you create a 
ZSQL method with your query and then you add a ZSQL Search Wizard which 
will automatically create a form which will call the ZSQL and a results 
page.

Charlie
-- 
Charlie Clark
eGenix.com

Professional Python Services directly from the Source
 >>> Python/Zope Consulting and Support ...
http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...
http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...
http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::

_______________________________________________
Zope-DB mailing list
Zope-DB at zope.org
http://mail.zope.org/mailman/listinfo/zope-db



More information about the Zope-DB mailing list