I\'m using knex to generate my SQL queries. In knex documentation, it shows this
knex
knex(\'users\').where(\'columnName\', \'like\', \'
I have not used knex in a while so I can not test this. But have you tried to literally escape %? I hope that is what you want.
let term = "%something%" let parsedTerm = term.replace("%", "\%") console.log(parsedTerm);
Tell me about that please.