PrismaP
Prisma6mo ago
4 replies
joel.rainearwills

TypedSQL Apostrophe

When I pass an apostrophe in a string argument to a typed sql query, i don't get the expected results.

-- selectBook.sql
SELECT * FROM book AS b WHERE b.name LIKE CONCAT('%', ? ,'%');


client.$queryRawTyped(selectBook("Dante's Inferno"))


If I pass "Dante", it works. If I pass "Dante's", then it doesn't work. I'm connection to MariaDB
Was this page helpful?