in reply to dbi mysql concat interpolation
I tried your SQL statement in mysql command line it works for me.
mysql> SELECT CONCAT('My','\'', 'QL'); +-------------------------+ | CONCAT('My','\'', 'QL') | +-------------------------+ | My'QL | +-------------------------+
There are several ways to include quote characters within a string:
A “'” inside a string quoted with “'” may be written as “''”.
A “"” inside a string quoted with “"” may be written as “""”.
Precede the quote character by an escape character (“\”).
A “'” inside a string quoted with “"” needs no special treatment and need not be doubled or escaped. In the same way, “"” inside a string quoted with “'” needs no special treatment.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: dbi mysql concat interpolation
by Anonymous Monk on Feb 19, 2015 at 20:01 UTC | |
|
Re^2: dbi mysql concat interpolation
by lykich (Initiate) on Feb 19, 2015 at 18:07 UTC | |
by Don Coyote (Hermit) on Feb 20, 2015 at 11:43 UTC |