[Zope] Get Column Names from SQL Query?

Jose Soares jose@sferacarta.com
Mon, 09 Apr 2001 09:51:01 +0200


Have you tried:
http://www.zope.org/Members/teyc/howtoSQLVariables

Jose'

Laurie Nason wrote:

> I have found something that does this but haven't managed to make it work as
> I want it to yet!
> <dtml-let Fields="queries.qryreturnallusers().names()">
>                 <dtml-in Fields>
>                         <dtml-var sequence-item></p>
>                 </dtml-in>
> </dtml-let>
> This gives the column headers
> If anyone knows of a way of doing this which gives the data as well as the
> headers in one fail swoop then let me know too.
>
> Laurie
>
> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
> Thomas B. Passin
> Sent: Wednesday, April 04, 2001 10:51 AM
> To: Zope Mailing List
> Subject: [Zope] Get Column Names from SQL Query?
>
> I want to run an SQL query, like
>
> select * from person
>
> Then I want to extract the column names from the returned data.  In other
> words, I don't want to hand-code them into the result page.
>
> I know how to do this in Cold Fusion, but I don't know how in Zope.
>
> I'm using a ZSQL method, of course, to query the database.
>
> Anyone know how to do this without running an external method?
>
> Tom P
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )