Skip to content

Commit 4e64398

Browse files
kiprobinsondougwilson
authored andcommitted
docs: add note about use with NO_BACKSLASH_ESCAPES
1 parent 5cbf163 commit 4e64398

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ var SqlString = require('sqlstring');
2424

2525
### Escaping query values
2626

27+
**Caution** These methods of escaping values only works when the
28+
[NO_BACKSLASH_ESCAPES](https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_no_backslash_escapes)
29+
SQL mode is disabled (which is the default state for MySQL servers).
30+
2731
In order to avoid SQL Injection attacks, you should always escape any user
2832
provided data before using it inside a SQL query. You can do so using the
2933
`SqlString.escape()` method:

0 commit comments

Comments
 (0)