[Zope] Hey buddy can you spare some Zen?
Steve Drees
drees@the-bridge.net
Fri, 4 Aug 2000 15:05:19 -0500
> I have the following ZSQLMethod.
>
> ID:
> =============================================================
> SQLAddRelease
> =============================================================
> Arguments:
> =============================================================
> releases.headline releases.author releases.email releases.body
> =============================================================
>
>
> Query Template:
> =============================================================
> INSERT INTO releases
> (author,
> email,
> body,
> timestamp,
> headline)
> VALUES
> (<dtml-sqlvar releases.author type=string>,
> <dtml-sqlvar releases.email type=string>,
> <dtml-sqlvar releases.body type=string>,
> <dtml-sqlvar ZopeTime type=string>,
> <dtml-sqlvar releases.headline type=string>);
>
> SELECT currval('releases_id_seq') AS Article_ID;
> ==============================================================
>
> When I test this method zope is smart enough to show me what
> Article_ID is.
> I can't for the life of me figure out how to get that value into the
> namespace.
>
> (Database is Postgres.)
I found the answer.
http://zope.nipltd.com/public/lists/zope-archive.nsf/47ba74c812dbc5dd8025687
f0024bb5f/0249b255731f1729802568e700386b2f?OpenDocument&Highlight=0,currval
Special thanks to NIP for providing this wonderful resource!