<p>What are the dangerous characters that should be replaced in user input when the users' input will be inserted in a MySQL query? I know about quotes, double quotes, \r and \n. Are there others?<br><sub>(I don't have the option of using a smart connector that accepts parameters so I have to build the query myself and this will be implemented in multiple programming languages, including some obscure ones so solutions such as <code>mysql_real_escape_string</code> in PHP are not valid)</sub></p>

What languages do you need to support? It is much better to use a language's built-in sanitization than to write your own.
Edit: Looking at
```
mysql_real_escape_string
```
on php.net:
```
mysql_real_escape_string()
```
calls MySQL's library function
```
mysql_real_escape_string
```
, which prepends backslashes to the following characters:
```
\x00
```
,
```
\n
```
,
```
\r
```
,
```
\
```
,
```
'
```
,
```
"
```
and
```
\x1a
```
.