This is a discussion on Creating a table of rankings within the MySQL Database forums, part of the Database Forums category; In my pilot logbook I fly with lots of different people on different occasions. I like, because I'm a ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
In my pilot logbook I fly with lots of different people on different
occasions. I like, because I'm a bit sad, to produce a list of who I've flown the most with. Currently I do this with a fairly convoluted method involving creating a temporary table with an auto incrementing column so I get an output a bit like this: Ranking | Name | Hours 1 | Smith | 145 2 | Jones | 135 etc. Is there a way of doing this without having to create and drop temporary tables or is that why temp tables exist in the first place? |
|
|||
|
On Apr 21, 4:27 pm, Robin <creffi...@gmail.com> wrote:
> In my pilot logbook I fly with lots of different people on different > occasions. I like, because I'm a bit sad, to produce a list of who > I've flown the most with. > > Currently I do this with a fairly convoluted method involving creating > a temporary table with an auto incrementing column so I get an output > a bit like this: > > Ranking | Name | Hours > 1 | Smith | 145 > 2 | Jones | 135 > > etc. > > Is there a way of doing this without having to create and drop > temporary tables or is that why temp tables exist in the first place? To get an intelligent answer (or indeed, any answer at all) I think you need to tell us a bit more about the structure of your database and how you intend to use/present this information. |