From:             [EMAIL PROTECTED]
Operating system: Any
PHP version:      4.0.4pl1
PHP Bug Type:     Feature/Change Request
Bug description:  odbc_insert_id()

Some way of accessing the most recently-inserted row would be very useful.  This could 
be done either by an odbc version of mysql_insert_id(), or (preferably) odbc_exec() 
returning a pointer to the newly-inserted row so that odbc_fetch_row() and 
odbc_fetch_into() can retrieve the data.

I need this because I need to access any identity fields (the closest mysql equivalent 
is auto_increment) that were created during an insert since I tend to use these as 
keys and have foreign keys in other tables pointing to them.

The 2nd way is preferable because it ensures that a very busy SQL server will not 
return any inserts that may have been done in between the insert command and the 
odbc_insert_id() command.  (Even if they're back-to-back, you may still have an insert 
sneak in between if the server is constantly being accessed.)


-- 
Edit Bug report at: http://bugs.php.net/?id=8786&edit=1



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to