[Zope] SQL-Query result

Andrew Kenneth Milton akm@theinternet.com.au
Thu, 20 Sep 2001 23:52:51 +1000


+-------[ Florian Schuler ]----------------------
| Greeting,
|=20
| I=B4m learning Zope/python at the moment. I tried something with databa=
ses
| and it seemed to work.=20
| I created a SQL-Method with select name from person where <dtml .... (
| it doesn=B4t matter) and call it with
|=20
| <dtml-call "REQUEST.set('user',
| getuserbyusername(username=3Dusername,password=3Dpassword))">
|=20
| but now if I make a <dtml-var user> I get an mysteric response. I know =
I
| know the GURUS of you will laugh but you know,
| without trying you can=B4t learn anything :-))

<dtml-in "getuserbyusername(username=3Dusername, password=3Dpassword)">
	<dtml-call "REQUEST.set('user', vorname + ' ' + name)">
</dtml-in>

ZSQL methods return a Result type, generally you need to iterate over
the return from your method, and access the columns by name.

It is possible to circumvent these procedures, but, it's not recommended.

--=20
Totally Holistic Enterprises Internet|                      | Andrew Milt=
on
The Internet (Aust) Pty Ltd          |                      |
ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemo=
n
PO Box 837 Indooroopilly QLD 4068    |akm@theinternet.com.au|=20