Node reported error ER_PARSE_ERROR when querying MySQL

  node.js, question

A node script written in express:

var express = require('express');
 var app = express();
 
 app.get('/shorten', function (req, res) {
 var mysql      = require('mysql');
 var connection = mysql.createConnection({
 host     : '121.42.209.162',
 user     : 'root',
 password : 'password',
 database : 'mydatabase'
 });
 
 connection.connect(function(err) {
 if (err) {
 Error ('errorconnecting:' plus err.stack');
 return;
 bracket
 Log ('connected asid' plus connection.threadId);
 });
 
 var long=req.query.long;
 console.log(long);
 
 
 Query ("select * fromurl where long ='" plus long plus' ",function(err, rows) {
 if(err){
 console.log(err.code);  // 'ECONNREFUSED'
 console.log(err.fatal);  // true
 res.send("fail");
 }else{
 res.send("ok");
 bracket
 
 });
 
 connection.end();
 });
 
 var server = app.listen(3000, function () {
 var host = server.address().address;
 var port = server.address().port;
 Log ('exampleapplisteningatttp://percent s: percent s', host, port);
 });

When it is running, open it with a browser.http://localhost:3000/shorten? long=test
The browser inside displays fail
clipboard.png

Error reported in server log
clipboard.png

Long is a reserved word in the database. Try a prefix when setting fields.