4 ms·
That is invalid in javascript, just like this is invalid: var foo = "string "with quotes" done." You can escape the inner backquotes \` but then its just a b
by qooleot 12y ago
That is invalid in javascript, just like this is invalid:
var foo = "string "with quotes" done."
You can escape the inner backquotes \` but then its just a backquote character in the string. It doesn't do anything special like call the template string again.
- Arnavion 12y agoBackticks are used around names that aren't valid SQL identifiers. In GP's example, he has a table with a space in the name ("example table") so it needs the backticks around it. It's not his intention to have the string be templatized twice.
- mhd 12y agoOnly in MySQL, as far as I know. And doesn't even that support the standard way of using regular quotation marks?