MySQL Forums
Forum List  »  Newbie

Re: insert in an ordered set, then reorder
Posted by: Marcelo Correa
Date: October 05, 2016 04:07PM

HI Barry,

first, thanks for your time.

I am no expert, and I am beginning to to believe my approach "giving an example to where I should arrive" could be a naive approach for that matter.

I will try to explain in my own words.

I will build a webpage with a ranking table (with integer values).
The ranking column must be consecutive and unique (in case of equality oldest topic wins)
A new topic could have any ranking from the beginning, then could go up and down.

after calculating the new rating of a visited/new topic "I think" I will have 3 problems.

- find the place where the topic will fit in the table.
- open space for that topic
- re-number the table accordingly

My first idea is to create an column and modify it as the rankings are changed.

With that column proper ordered, its a matter of using "order by" that column.

Any suggestions are welcome.

again thanks for your time,

regards,

Options: ReplyQuote


Subject
Written By
Posted
Re: insert in an ordered set, then reorder
October 05, 2016 04:07PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.