• We would like to invite you to check out the latest 1.0 alpha versions. You can read more about what's new here. Please note, that this is still an early release and will contain new bugs ¯\_(ツ)_/¯
  • 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