[Zope-DB] Simple Question - How Do I Get A Z SQL Query Available To General Public

Charlie Clark charlie at egenix.com
Tue May 11 15:29:55 EDT 2004

Hi Jim,

try using the pull-down product "Z Search Interface". It will generate a 
report PageTemplate for you which will generally be available for all to view 
unless it's in a restricted folder or you restrict it's "view" permission.

On 2004-05-11 at 21:10:07 [+0200], Pinball Jim <pinballjim2000 at yahoo.com> 
> Hello everyone,
> I'm new to the list and hope this message isn't too irritating.  I've spent 
> hours pouring over books and websites and can't find any information on 
> this.  I'm sure it's right there and I'm not seeing it, though!
> Here's the situation.  I've got a MySQL database that consists of 1 table, 
> 15 fields, and about 3,000 records.
> This database has to be put online and be accessible through the world wide 
> web to anonymous users.  The information is public record and we cannot be 
> dealing with setting up user accounts.  Was doing great with PHP until the 
> IT department decided we could no longer use it.

Sensible department! ;-)
> I've got my Zope server connected to the database, and I have written a 
> very simple Z SQL query that is more or less the nuts and bolts of the 
> situation:
> select * from WebDatabase
> <dtml-sqlgroup where>
>    <dtml-sqltest Name type="string" op="like">
>    <dtml-and>
>    <dtml-sqltest Title type="string" op="like">
> </dtml-sqlgroup>

eek! I hate <dtml-sqlgroup> and <dtml-sqltest>: as a simple rule of thumb: 
use as much plain SQL as possible as this makes debugging a lot easier.
> Works fine from management view, but I need anonymous people to be able to 
> use this.

You should be happy that they can't usually see your ZSQL-methods.
> So, here's where I throw myself at your mercy.  I need my index_html file 
> to come up and have this query so that anyone can use it.  I can work on 
> making it pretty later.
> Any help is very much appreciated!

Charlie Clark

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 ! ::::

More information about the Zope-DB mailing list