[Zope] How can I let ZSQL method know the variable i define.

Peter Sabaini sabaini@niil.at
Sun, 28 Oct 2001 13:37:13 +0100 (CET)


curious...
=20
for testing i put something similar on my machine and it just works.

are you certain that the URL0 value is in your db's table? just asking=20
because you talk about hardcoding "/" whereas URL0 would return sth=20
like "http://localhost:8080/your_folder/calling_method"=20

btw. as Paz pointed out you dont need to use set() at all, you also=20
can do <dtml-in "query(url=3DURL0)">

are you acquiring the method which performs the queries? maybe=20
acquisition messes with your URL0 somehow; try calling the method=20
directly.

On Sun, 28 Oct 2001, Eiffel wrote:

> hi:
>     i really crazy about this question, i simplify the question
>=20
> i rewrite the code and simplify it
>=20
> <dtml-call "REQUEST.set('pageurl', URL0)">
> <dtml-in "test_for_page_count(pageurl=3Dpageurl)">
> <dtml-in "getPageViews(pageurl=3Dpageurl)">
> <center>
> This page has been viewed <b><dtml-var pagecount></b> time.=20
> </center>
> </dtml-in>
> </dtml-in>
>=20
> it disply nothing, when i hard code pageurl variable and rewrite it lik=
e this=20
>=20
> <dtml-call "REQUEST.set('pageurl', URL0)">
> <dtml-in "test_for_page_count(pageurl=3D'/')">
> <dtml-in "getPageViews(pageurl=3D'/' )">
> <center>
> This page has been viewed <b><dtml-var pagecount></b> time.=20
> </center>
> </dtml-in>
> </dtml-in> =20
>=20
> well, this time it works, so it means that=20
>=20
> <dtml-in "test_for_page_count(pageurl=3Dpageurl)"> could not forward pa=
rameter to ZSQL method.
>=20
> even I rewrite code like this,
>=20
> <dtml-in "test_for_page_count(_.None,_,pageurl=3Dpageurl)">
>=20
> still does not work.
>=20
> i was wondering that if zope's builtin database gadfly is fit for this =
small code.
>=20
> =FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=
=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=D9=A2=97=A6j)e=8A=CB=FFf=8A^=FF:){=FA+=82=
=1Bm=A7=FF=FF=96+-=B3=FC=E8=A5=EF=E8=AE=0F=E6j)fj=7F=E5=8A=CBb=9D=FA?=CE=8A=
^=FF=F3hr=BA,=B2=9A,=B6=CA+=1D3=0Bzw(v)=E0=FF=FF=FFE=E9Z=B5=E7e=8A=CBl=FE=
=1Bm=A7=FF=FF=96+-=B3=FC=E8=A5=EF=E8=AE=0F=E6j)fj=7F=E5=8A=CBb=9D=FA?=CE=8A=
^=FD=A9=E7=A2=E9=DCz=1Bm=A7=FF=FF=96+-=B3=FC=E8=A5=EF=E8=AE=0F=E6j)fj=7F=E5=
=8A=CBb=9D=FA?=CE=8A^=FD=D7=AF
>=20

--=20

_________________________________________________
peter sabaini, mailto: sabaini@niil.at
-------------------------------------------------