[Zope] MySQL LAST_INSERT_ID...

Jordan B. Baker jbb@spyderlab.com
Tue, 16 Mar 1999 17:35:08 -0500 (EST)


On Tue, 16 Mar 1999, Tom Jenkins wrote:

> OK to follow up,  if you use call mysql using the form
> select CONCAT(LAST_INSERT_ID()) as new_id 
> you get back the correct value in 'last_id'
> 
> now I'm still having problems with getting that value into the REQUEST 
> object.  What goes in place of the ???
> <!--#call REQUEST.set('last_id', ???)-->
> 
> (Pardon me if this has been answered already, there was some 
> problems with me getting messages from zope list)
> Thanks again...

Well, try something like:

<!--#in lastInsert-->
	<li>The id last inserted is <!--#var new_id-->
<!--#/in-->

where lastInsert is your SQL method

Note this is untested code, so caveat emptor :)

Have fun,

-------
Jordan B. Baker -- jbb@spyderlab.com
weaving the web @ http://www.spyderlab.com