Luis, See http://www.mysql.com/php/manual.php3?section=Getting_unique_ID
-----Original Message----- From: Luis Cortes [mailto:lcortes@pollak.com] Sent: Monday, April 17, 2000 2:19 PM To: zope@zope.org Subject: [Zope] MySql and Auto_increment
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.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )