Re: PHP, ODBC & Access2k - Getting a field value from the last INSERT

From: Date: Fri, 16 Nov 2001 17:19:19 +0000
Subject: Re: PHP, ODBC & Access2k - Getting a field value from the last INSERT
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-14408@lists.php.net to get a copy of this message
In article <20011115213312.37973.qmail@pb1.pair.com>, dboitnot@yahoo.com says... > I have a table that I need to update using "INSERT INTO table (field1, > field2) VALUES (val1, val2)" The table has an AutoNumber field for a Primary > Key called "ID". I need to get the ID that was assigned in the INSERT. > With PostgreSQL you do this with oids but as far as I know Access doesn't > use them. How then can I do this? Well, since you insist on using Access for a web database... Here's one way... Make sure you are tracking sessions, Create a session field in the Access table. After the instr, select the max(recordID) for the table with the current session number. Many here would recommend that you convert to mySQL and drop Access...

« previous php.db (#14408) next »