I've got a php script that does a simple insert into an MS Access table that has a field 'SpecID' set as an Autonumber.
Is there a way of getting the SpecID number either before or after the new record is created?
Thanks
Printable View
I've got a php script that does a simple insert into an MS Access table that has a field 'SpecID' set as an Autonumber.
Is there a way of getting the SpecID number either before or after the new record is created?
Thanks
Are you using odbc?
Thanks for the reply, Yes I am.
At the very least, you'll need to execute another query:
http://www.utteraccess.com/forums/sh...086320&fpart=1
Using standard complient SQL, you can:
Code:SELECT MAX(id) AS last_id FROM table_name;
I'll give this a go and see what happens.
Thanks
This works great for my purpose.
I extended it a little as more than one user will be updating:
PHP Code:SELECT MAX(id) AS last_id FROM table_name where userid = $UserID;