I made this code:
con.query("SELECT orgID FROM players WHERE scID = "+socialID+""), function (err, result) {
if (err) console.log(err)
console.log(result)
It returns this:
[ RowDataPacket { orgID: null } ]
Is there any way to make it return just 'null' without having to convert it to a string and parsing it?
resultis an array containing a single object, with a single propertyorgID. You can access it withresult[0].orgID