How to get the last record

Results 1 to 3 of 3

Thread: How to get the last record

  1. #1
    Join Date
    Dec 1969

    Default How to get the last record

    what is the SQl for getting the last record in a table<BR>or lastUpdated record(i presume both are same)<BR><BR>select * from table where record = last<BR><BR>something like that.thanks a lot.

  2. #2
    An Observer Guest

    Default RE: How to get the last record

    Do you do any work on your own?

  3. #3
    Join Date
    Dec 1969

    Default RE: How to get the last record

    After I have updated, or added a record, if you had updated the record, you already have the keyfield value, if you have just added a record, I usually do a simple select statement that asks for all of the fields, that have all of the fields equaling the fields you know....<BR><BR>eg, if I just added a record.<BR>Record_id = ??<BR>last_name = Harrison<BR>First_name = Frank<BR>Password = test<BR><BR>I would do this:<BR>select * from users where last_name = &#039;Harrison&#039; and first_name = &#039;Frank&#039; and password=&#039;test&#039;<BR><BR>This will return the record that matches my search criteria. Assuming there are no other records in the database, that have the same last name, first name and password, you will then be able to get the unique id for the record...<BR><BR>=-= Whol

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts