[Zope] setting variable

Tom Jenkins TomJenkins@zentuit.com
Mon, 15 Mar 1999 22:49:52 -0500


Hello folks,
I'm stuck on a problem which I hope some one could help me with.  I 
have a database entry form where the user will enter in information for 
two related tables.  When she submits the form, I want to first post one 
tables information, then call another sql method to get the id generated 
for that post, then take that value and add it to the REQUEST object 
and pass it to the second sql insert for inserting to the second table 
(along with some other parts of the REQUEST object from the form).  

I'm planning on using MySQL that has a special select:
select LAST_INSERT_ID()
to return the last auto-generated id value to get the id.

I know you can add a variable to the REQUEST object via
<!--#call "REQUEST.set('varname', value)"-->
but how to I get the value from the sql method?  The only way I know 
now is via #var tags but you can't nest the DTML.

I hope this makes sense...

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Tom Jenkins                    DevIS (http://www.devis.com)
Linux & Samba 2.0 : The best Windows file server
http://www.zdnet.com/sr/stories/issue/0,4537,2196106,00.html                                         
"Do not be overcome by evil, but overcome evil with good." Romans 12:21