• TeamSpeak has reported a vulnerability in it's client that can potentially lead to RCE. A new version has been released that fixes it. So please update the client in your bot installation as soon as possible as well. Click here for more information.
  • If you need help or want to discuss things, you now can also join us on our Discord Server!

EN dbc SELECT problem

William147

New Member
Hello,

I have a problem with SELECTing from the database. Since I updated my SinusBot the code don't work properly.
JavaScript:
if (dbc) dbc.query("SELECT * FROM moderators ORDER BY `points` DESC", function(err, res) {

   if (!err) {

      res.forEach(function(row) {

         ev.client.chat("" + helpers.toString(row.lastname) + " ( " + helpers.toString(row.UID) + " ) : " + helpers.toString(row.points) + "");

      });

   }

});
Example output:

<17:34:43> "ScriptBOT": "102,114,101,100,101,114,105,99,111,32,99,111,120,32,97,107,97,46,32,107,119,105,108,108,121" ( "50,55" ) : "51"
<17:34:43> "ScriptBOT": "84,104,111,109,97,115,32,66,114,97,117,109" ( "54,49,54,48" ) : "49"


The data in the database are texts.

Who could I fix the problem?
 

Similar threads

Top