I'm trying to store an hexadecimal value (\xC1) in MySql Database. When I print that with PHP, i get: xC1lcool instead of the right word.

> 
> INSERT INTO veiculos VALUES (1, 'Ford', 'Ka RoCam Flex', 25850.00, 1998, 1999, 'Vermelho', 15000, '\xC1lcool;Gasolina;GNV', 'Ar-Condicionado;4 portas;Câmbio automático', 'imagem1.jpg;imagem2.jpg;imagem3.jpg;imagem4.jpg;imagem5.jpg;'), (2, 'Ford', 'Ka RoCam Flex', 223850.00, 1999, 2001, 'Prata', 10000, '\xC1lcool;GNV', 'Ar-Condicionado;4 portas;Câmbio automático;', 'imagem1.jpg;imagem2.jpg;imagem3.jpg;imagem4.jpg;imagem5.jpg;'), (3, 'Ford', 'Fiesta', 21380.00, 1998, 2002, 'Preto', 23043, 'Gasolina', '', 'imagem1.jpg;imagem2.jpg;imagem3.jpg;imagem4.jpg;imagem5.jpg;');
> 
> 
> 

How could i do that?
['https://Stackoverflow.com/questions/3686778', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/444582/']
`\x` is not a valid escape sequence. Valid sequences are detailed at <http://dev.mysql.com/doc/refman/5.0/en/string-syntax.html>

Quoting the manual:

> 
> For all other escape sequences,
>  backslash is ignored. That is, the
>  escaped character is interpreted as if
>  it was not escaped. For example, “\x”
>  is just “x”.
> 
> 
> 

You can specify a full string in hexadecimal:

```
SELECT 0x61626364 -- Prints abcd

```

If you want to mix both styles, you have to concatenate:

```
SELECT CONCAT('a', 0x6263, 'd') -- Prints abcd

```
Use MySQL [`UNHEX()`](http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_unhex) function with [`CONCAT()`](http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat). Like this

```
insert into tablename values (CONCAT(UNHEX('C1'), 'other-part-of-string'))

```