I have a trouble with my laravel application, and I don't have idea of what is the problem...
I write in my database spanish words like: "Camión"
which contains accents, but when I go to phpmyadmin
I see "Camión"
.
Due to this, when I use the next sql query:
select * from table where name like '%Camión%'
I get zero rows. The same if I use:
select * from table where name like '%Camion%'
I use utf8_spanish_ci
collate.
can someone help me with that, please?
I don't know why I store html entities in my database.How I can know? I think I do nothing special...
Don't store html entities in the database. Those entities are intended for use in HTML only, in order to prevent cross site scripting attacks amongst other things. Use htmlentites when outputting to a HTML page via PHP.
Having said this, make sure you properly parametrize your database queries when using user-inputted data in order to prevent SQL injection attacks.