I have an Access database that PHP will be accessing.  (I'm assuming I have to do this 
via ODBC and the Unified ODBC functions in PHP, but correct me if I'm wrong.)

The PHP script will be inserting new records into the Access database.

The primary key in many of the tables in the Access database is an "autonumber" field. 
 Thus, the key value will be unknown until after I make the insert call.

My question: Either before or after the insert, is there any way for me to find out 
what the key value is?  I know if I were using MySQL, I could call the 
mysql_insert_id() function to get this information.

This is critical to me, because my project entails maintaining a new database 
(actually, a MySQL database) that contains the same information as an existing Access 
database.  Changes will be made to the new database, which then need to be propagated 
to the Access database.  In order for these databases to remain synchronized, I need 
the primary keys to be the same in both databases, clearly.

Thanks for any suggestions!

- Ken

PHP Database 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