• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

EN dbc SELECT problem

William147

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?
 
Top