Getting data
Let's start with the real job! Get all the data, get some bits and sort the data!
Get all the data
Let's start with getting all the data. If you want to get all the data, use the function table.getAll
. There are no parameters that you have to use! Here is a example.
Getting specific data
You can also get specific data. For that, you can use the function table.where
. You have to use a filter for the one parameters.
Sorting data
Let's say you have a point system in a Discord bot. And then you want to make a leader board. With Better-MySQL is that really simple! The only thing you have to do, is use the table.sort
function and send the results.
For the sorting function, you have to make a filter and give the column up that you want to sort. Here a example.
Last updated