[Zope] sql methods
Graham Chiu
anon_emouse@hotmail.com
Sun, 6 Jun 1999 15:24:59 +1200
I would like to create a session variable and store it in a table.
I created a sqlmethod as follows:
id: active_sessions
arguments: sessionid
select *
from session
where
<!--#sqltest sessionid
column=sessid type=string-->
which works fine when tested.
I have called it like this:
<!--#if "REQUEST.cookies.has_key('CK_Session')"-->
Your sessionid is <!--#var CK_Session--><br>
<!--#else-->
No sessionid
<!--#/if--><br>
<!-- this confirms that the CK_Session variable is available-->
<!--#in expr="active_sessions(sessionid=CK_Session)"-->
<!--#if sequence-start-->
Yes, this session id is logged<br>
<!--#else-->
Need to add this session id<br>
<!--#/if-->
<!--#/in-->
but nothing gets printed between the #in #/in tags.
-------
Regards, Graham Chiu
gchiu<at>compkarori.co.nz