[Zope] Using Page Templates to display data from a database
   
    Geir Bækholt
     
    Geir Bækholt <geirh@funcom.com>
       
    Fri, 30 Aug 2002 09:41:20 +0200
    
    
  
on or about, Friday, August 30, 2002, we have reason to believe that
James White wrote something along the lines of :
JW> I'm trying to use Page Templates to pull data from a relational database
JW> and display it in table form. Can anyone help me=3F
use a Zsql-method to get the database-results:
    SELECT field1, field2 FROM exampletable
then use something like  the following in your pagetamplate to display
it:
<table>
<tr tal:repeat=3D"rows here/nameOfYourZsqlMethod">
    <td tal:content=3D"rows/field1" />
    <td tal:content=3D"rows/field2" />
</tr>
</table>
also see :
http://www.zope.org/Documentation/Books/ZopeBook/current/RelationalDatabase=
s.stx
for more thorough information
--=20
Geir B=E6kholt       Web Developer
geir@funcom.com    Product Operations
                   Funcom Oslo