I'm currently working on creating a Discord bot with a level module, and I can't seem to grab the position of a MySQL column. This is to display the current rank of the user. Here's the query:
connection.query(`SELECT * FROM levels WHERE GuildID = ${message.guild.id} ORDER BY UserLvl DESC, LevelExp DESC`, function(error6, results6) {
result_json6 = JSON.stringify(results6);
final_result6 = JSON.parse(result_json6);
});
I've tried several things, from forEach to while to for and more. Is there any way to grab the position of a column and display it?