SaraVieira / awesome-talks

Awesome Talks Curated By the Community
MIT License
809 stars 62 forks source link

Bug: order for date pulls results in reverse order #107

Closed shaunmolloy closed 6 years ago

shaunmolloy commented 6 years ago

Bug: order for date pulls results in reverse order

screen shot 2018-07-27 at 08 57 02

https://en.wikipedia.org/wiki/Sorting#Sorting_information_or_data

screen shot 2018-07-27 at 09 21 16

SaraVieira commented 6 years ago

Hey !

From what I see when I use order in Year as ASC I start with talks from 2008 and then it keeps going up

Is that wrong ?

shaunmolloy commented 6 years ago

This would show oldest first:

SELECT *
FROM table
ORDER BY created ASC
LIMIT 10
SaraVieira commented 6 years ago

That's what is happening if you select by year but the created at is not for the talk but for when it was added into the DB

shaunmolloy commented 6 years ago

Ah, so it would probably need adjusting on the frontend, so it's not confusing to the user.

SaraVieira commented 6 years ago

That is a good point :(

What should I call it?

shaunmolloy commented 6 years ago

"Date added" instead of "created at" might make more sense.

screen shot 2018-07-27 at 12 51 39

Edit: Also the date shown for the results should be in the correct order, so the DESC should show the ASC results and visa-versa.

screen shot 2018-07-27 at 12 55 49

SaraVieira commented 6 years ago

That date is the video year that I get from youtube :(

SaraVieira commented 6 years ago

And I'll change that to date added, that makes more sense :)