[Zope] Can I capture results from insert in Z SQL methods?

Andrew Veitch andrew@logicalprogression.net
Sat, 02 Nov 2002 14:06:21 +0000


This is really a general SQL problem rather than anything to do with Zope/
ZSQL.

As you're using Postgres you should really be using sequences to store your
id's. Using the serial type is a quick way of doing that.

Then do a select nextval('whatever'); to get the next id which can then be
used for the inserts.

A

-- 
Logical Progression Ltd, 3 Randolph Crescent, Edinburgh, EH3 7TH, UK
Tel: +44 (0)131 466 9585 Web: http://www.logicalprogression.net/