[Zope] MySql and Auto_increment
Luis Cortes
lcortes@pollak.com
Mon, 17 Apr 2000 12:19:10 -0600
Hello,
Has anyone run into this problem: I have created a table with an
auto_increment id. I want to be able to get the new id without having to do
another query. Does someone know how to do this with Mysql?
I.E.
create table test( id NOT NULL auto_increment, name char(20))
insert into table test (name) values ("first");
> at this point I would like to get the id assigned to first without
doing a
select id from test where name ="first"
is there a way to do this????
Thanks,
Luis.