So I am new to Node, I know exactly how to do what I want in PHP, I'm in node though. So no idea.
I have the following.
switch(args[0]) {
case 'games':
var games = con.query("SELECT name FROM games");
message.channel.send('Available Games:');
}
My connection is already set-up and working. I just wanna know how to foreach through the data now to list what I want.
For instance, since I queried name in games, I want to the message back to show all the game names.
Can I foreach here? Not sure at all.
in php I would just
foreach($games as $games) {//stuff here}
That is not working though.
Thanks,
Kevin