How to wrap values within % % placefolder in mysql module in node.js?

Is there any way to write some queries such as this in mysql module in Node.js?

select * from table_name where name like "%value%";

In Node.js, you can use ? placeholder in order to put some values into sql query. However, the following code doesn't work.

connection.query('select * from table_name where name like "%?%"', value, function(err, rows){
    if(err) throw err;
    console.log(rows);
});

When I wrote the code above, I got an empty result since mysql interpreted my code as %'value'%, superfluous single quotation included. So is there any way to put value into sql query without including that extra quotation?

Thanks.

Placeholders are for escaping, not really for text formatting.

You can use this instead:

connection.query('select * from table_name where name like ?', '%' + value + '%', ...)