[Zope] Howto convert ZSQL results

Tony McDonald tony.mcdonald@ncl.ac.uk
Fri, 02 Nov 2001 19:46:50 +0000


On 2/11/01 5:35 pm, "Juli=E1n Mu=F1oz Dom=EDnguez" <jmunoz@softhome.net> wrote:

> Thanks a lot !!!
>=20
> The query I am doing is:
> select MAX(CliCodigo) from ClientesTabla
>=20
> And the column that is returned by zope is named 'Expr1000' (a bit
> strange :-)), and doing:
>=20
> I=3Dint(container.last_customer()[0].Expr1000)
>=20
> Works !!!
> Thank you, I was becoming fool :-)
>=20

If you rewrite the SQL as;

select MAX(CliCodigo) as max_clicodigo from ClientesTabla  (this is an
SQL-alias basically)

You'll get a variable called mac_clicodigo which you can use.

hth
Tone.
--=20
Dr Tony McDonald,  Assistant Director, FMCC, http://www.fmcc.org.uk/
The Medical School, Newcastle University Tel: +44 191 243 6140
A Zope list for UK HE/FE  http://www.fmcc.org.uk/mailman/listinfo/zope