ID/number of last item submittedto database

2001-01-18 Thread Alans
Hi. I have a database where information is submitted to. On the submit page I want to show the ID number of next 'thing' to be submitted. I use auto increment for the ID. There must be some way of asking what the last ID number was (I can then add one to this) is there a function for this? or

Re: ID/number of last item submittedto database

2001-01-18 Thread Alans
something like this I was hoping SELECT MAX([database.[ID]) AS [LAST-DEFECT] FROM [database] Hi. I have a database where information is submitted to. On the submit page I want to show the ID number of next 'thing' to be submitted. I use auto increment for the ID. There must be some way

Re: ID/number of last item submittedto database

2001-01-18 Thread David Delombaerde
is there a function for this? or do I have to get all IDs and parse out the last one? Try this function: SELECT DISTINCT last_insert_id() from "table_name" Regards, David - Before posting, please