[DiscordArchive] anyone know why i can't sort by ids in heidisql?
[DiscordArchive] anyone know why i can't sort by ids in heidisql?
Archived author: protopulse • Posted: 2024-09-06T21:51:50.892000+00:00
Original source
now it works again
Archived author: protopulse • Posted: 2024-09-06T21:51:58.534000+00:00
Original source
let me try your command just for learning purposes
Archived author: protopulse • Posted: 2024-09-06T21:53:35.789000+00:00
Original source
```SELECT * FROM `acore_auth`.`account`
ORDER BY ID ASC
```
Archived author: protopulse • Posted: 2024-09-06T21:53:36.844000+00:00
Original source
yep!
Archived author: protopulse • Posted: 2024-09-06T21:53:40.933000+00:00
Original source
works great thank you
Archived author: Sedge • Posted: 2024-09-06T21:54:08.975000+00:00
Original source
It's manual searching.
Select all records from <tablename>
order them by the ID column in descending order.
Between these, you can filter your data. Example, where you want only to see IDs greater than 100
Select * from account
Where ID > 100
Order by ID Desc
Archived author: protopulse • Posted: 2024-09-06T21:54:40.518000+00:00
Original source
mysql uses ` instead of quotations for string names huh
Archived author: Sedge • Posted: 2024-09-06T21:56:23.514000+00:00
Original source
If you list in just what I posted above, it will also work. The apostrophes enclose a string in the event there is a conflict or spacing.
Archived author: Sedge • Posted: 2024-09-06T21:57:51.223000+00:00
Original source
Once you get super serious, you can query across multiple tables and join on shared values (such as ID) to correlate data into a single table
Archived author: Sedge • Posted: 2024-09-06T22:11:16.192000+00:00
Original source
Sorry, ADHD kicking in.
```
SELECT account.id, account.username, characters.name, characters.level, characters.xp, account.last_login
FROM acore_auth.account
LEFT JOIN acore_characters.characters
ON characters.account = ACCOUNT.id
WHERE last_login IS NOT NULL
ORDER BY last_login desc```