12 Jun
2003
12 Jun
'03
4:11 p.m.
Hi, I'm trying to push the last_inset_id from an Insert statement onto the request namespace, so I can pick it up and retrieve the new record for display. My ZSQL method looks like this. INSERT INTO suppliers (insert statements removed) <dtml-var sql_delimiter> SELECT last_insert_id() AS lastinsertid <dtml-call "REQUEST.set('id',lastinsertid)"> It comes back with a NameError - global name 'lastinsertid' is not defined. How do I either get the dtml-call to see the lastinsetid variable, or grab the value by using the sql statement inside the dtml-call statement. It's driving me mad Cheers Michael