Re: [PHP-DB] how obtain last id past insert?

2003-11-20 Thread pete M
depends which DB your using in mysql its "select last_insert_id()" and in mssql for example its "select @identity" have fun Pete Webmaster D.G.R.E.R. wrote: Hi: How i obtain inmediatly the id of last insert ? For example i have a forum, when the user post a question, i send a mail to adm

Re: [PHP-DB] how obtain last id past insert?

2003-11-20 Thread John W. Holmes
Webmaster D.G.R.E.R. wrote: Hi: How i obtain inmediatly the id of last insert ? For example i have a forum, when the user post a question, i send a mail to administrator, but i want to refer the id from this insert, how i do this ? Well i think to make a select max(id) inmediatly but i

Re: [PHP-DB] how obtain last id past insert?

2003-11-20 Thread jeffrey_n_Dyke
if you're using mysql php.net/mysql_insert_id if you're not, there may be a variant for you db hth Jeff "Webmaster