To do a dev into the ERP Dolibarr, I need to make some requests to the mysql database.
One of it cannot work properly cause some characters are replaced by html entities (EDIT):
Here's my request:
SELECT MIN(rang) FROM dolibarr.llx_propaldet WHERE fk_propal = $propalId AND rang > :rank AND special_code = 104777 AND description <> 'Sous-total'
And what is really sent if I do a var_dump of my request:
SELECT MIN(rang) FROM dolibarr.llx_propaldet WHERE fk_propal = 3 AND rang > $rank AND special_code = 104777 AND description <> 'Sous-total'
Some info that might help you:
- the database is encoded in latin 1
- when I create my PDO connexion I precise that statement :PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES UTF8'
so it does encode into UTF-8.
- I've tried the mb_convert_encoding() function with UTF-8 as second parameter without success.