为什么mysql.escape会将“hello”parsing为“\”hello \“

我将首先逃避参数,然后在查询时连接sqlstring。 所以当我连接查询string使用like

 const name = mysql.escape(req.info.name) const sqlString = `select...name like '%${name}%'` 

这将导致select ... where name like '%'hello'%' ,但我想要的是select ... where name like '%hello%'

图片

在这里输入图像说明