我正在尝试使用mysql2执行该查询:const [[questions]] = await db.promise().execute('SELECT * FROM `questions` WHERE `questions`.`topic` LIKE ?', ['%' + text + '%']);
但是从数据库中什么也没得到。
然后我尝试了这样的一个:const [[questions]] = await db.promise().execute("SELECT * FROM `questions` WHERE `questions`.`topic` LIKE '?'", ['%'+text+'%']);
,还是一无所获。
我应该在这里如何准备陈述?