Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to show database record number on confirmation 2

Status
Not open for further replies.

NewGirl999

Technical User
Jul 8, 2009
6
GB
I'm working with SQL and Frontpage and have a form for staff to report computer faults to the helpdesk. The form works really well and displays a confirmation page after submission. I've been asked to show the record ID or another sequential number on the confirmation page but I can't work out how to do this.

Any help would be very much appreciated. Thank you.
 
If it is the last record the SQL is
Code:
select count(*) from table;
It really depends on whether your record IDs from 1 or from some other number. If they start from say 20, then you'll need to add 20 to the count.
 
xwb:

I can see a problem with that query. If another user creates an entry before the query is run, the count will be higher than expected.

You would need something more specific, such as

Code:
SELECT RecordID FROM TableName WHERE username = 'abc' AND ReportTime = '12:00:00'

Essentially, it all depends on how the table is set up and what columns are used.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top