For example, I have this code and email mas.bagus@gmail.com already in the database:
const email = "mas.bagus@gmail.com"
const inDBCheck = await db.execute(`select email from customer where email = "${email}";`)
When I run in a web environment (Deno in my case), that statement will return zero-length row of a ResultSet. But when I run in terminal, it returned a result.
Currently I have no problems with that, I change the double quote around ${email} into single quote. It works on the web!
But I wonder why does it give different results given different environment?
For example, I have this code and email
mas.bagus@gmail.com
already in the database:When I run in a web environment (Deno in my case), that statement will return zero-length row of a ResultSet. But when I run in terminal, it returned a result.
Currently I have no problems with that, I change the double quote around
${email}
into single quote. It works on the web!But I wonder why does it give different results given different environment?