[Zope] SQL question...I think

Dieter Maurer dieter@handshake.de
Wed, 30 Aug 2000 00:30:50 +0200 (CEST)


George writes:
 > ....
 > I know how to insert data in to the table,
 > search and such. I can not find any info on how to embed the data in my
 > dtml-html code to show it to the world.....
Because, you can already search, you do already embed data in
dtml-html to show it to the world.
You just do not yet realized it....

Okay, one step further:

 * In your "Available Objects", you will find an entry
   Z Search Interface.

   Add it to a folder!

   It will ask for a connection id, and id for the search form
   and the report.

 * The report presents search results to the world.
   It is a DTML method.
   Look at it, look at the DTML documentation,
   try to understand "dtml-in" and its parameters.

 * Change the report by removing columns (the columns, you
   do not want to show).

 * Play with the "size" and the "orphan" (these are 
   <dtml-in> arguments).

 * If you still do not yet get, what you want
   (then you will already have high requirements),
   then notice the following facts:

    - the result of an Z SQL method behaves like a sequence

    - "_.len" gives its length, i.e. the number of hits

    - "...[i]" gives you the "i"th hit

    - each hit behaves as an object with the columns as attributes

   Do not be frustrated, if you do not get this handled at the
   first trial.


Dieter