It is necessary to select a row from the database, if you use sampling by a numeric column, then everything works fine, but if the column with a row returns an empty result and no errors. SQL in phpmyadmin on the server works great. Code (made specifically to check if it works):
con.query("SELECT unit FROM `units_info` WHERE `name`=?",[match[1]],function (error,row){ console.log('errors:'+error); console.log(row)}); Match [1] is a string variable, the result of processing the string entered by the user by a regular expression.
Even if instead of name =? enter name = 'Text' does not work (although it is handled well in phpmyadmin)
"SELECT unit FROM `units_info` WHERE `name`='?' ""SELECT unit FROM `units_info` WHERE `name`='?' "... - Akina