Whaih Posted February 27, 2006 Share Posted February 27, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/3661-retrieving-the-position-of-the-row-inserted/ Share on other sites More sharing options...
ToonMariner Posted February 27, 2006 Share Posted February 27, 2006 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 Link to comment https://forums.phpfreaks.com/topic/3661-retrieving-the-position-of-the-row-inserted/#findComment-12694 Share on other sites More sharing options...
Whaih Posted February 27, 2006 Author Share Posted February 27, 2006 [!--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 Quote Link to comment https://forums.phpfreaks.com/topic/3661-retrieving-the-position-of-the-row-inserted/#findComment-12698 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.