From: Sean Chittenden Date: 2002-05-27T13:27:09+09:00 Subject: Re: DBI access to mysql auto_increment record numbers? > Sean, sorry if I'm being obtuse, but this isn't working out. Yeah, I was wrong about that. > Am I using the right software? Suggestions? with ruby-mysql 0.3.3 and dbi .15, you should be able to do: dbh.func('insert_id') Michael Neumann posted the way for how you do that recently... I can't remember the specifics. I believe it was on ruby-talk though. I think the 1st one works, but I'm not sure. dbh.func(:insert_id) dbh.insert_id dbh['insert_id'] Might I suggest using PostgreSQL instead? Select curval('my_seq_id') is slightly more general. -- Sean Chittenden