Jump to content

retrieving the position of the row inserted.


Recommended Posts

I have a problem:

I have inserted a row into the database. And now i have them organise in asc order to my preference.
Now i would like to retrieve the position of that row that i inserted a while ago.

E.g. There are 100 records, the row that i inserted is in the no.69 position after i order them in asc order.
How am i able to code it to know that the row is in that position?

Note: using autonumber (id) is out of the question because i have asc them in a way that whenever there is a new record insert, the position will change.
Why can't you let the database do its stuff and just store the information. Do the sorting via any query to retrieve the data.

It seems a very unuseful situation to have to sort the database all the time when as far as it is concerned it cares not a jot where things are!!!
[!--quoteo(post=349789:date=Feb 27 2006, 05:59 PM:name=ToonMariner)--][div class=\'quotetop\']QUOTE(ToonMariner @ Feb 27 2006, 05:59 PM) [snapback]349789[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Why can't you let the database do its stuff and just store the information. Do the sorting via any query to retrieve the data.

It seems a very unuseful situation to have to sort the database all the time when as far as it is concerned it cares not a jot where things are!!!
[/quote]


Hmmm, i'm doing an application to know the position of the runner base on the timing inserted. That's y i need to know where is the row inserted
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.