Ver Mensaje Individual
  #8 (permalink)  
Antiguo 11/04/2014, 08:15
Qazser
 
Fecha de Ingreso: abril-2014
Ubicación: Canarias!
Mensajes: 150
Antigüedad: 10 años, 1 mes
Puntos: 10
Respuesta: Problema con acentos mysql-php

Cita:
En la conexion con la base d edatos:
Código PHP:
$mysqli = new mysqli(localhostusuarioclavebasedatos);
$mysqli->query("SET NAMES 'utf8'"); 
Segun php, dicho procedimiento no es recomendado. Por favor, usa en todos casos

Código PHP:
$mysqli = new mysqli(localhostusuarioclavebasedatos);
$mysqli->set_charset("utf8"); //Elegimos el set de caracteres adecuado 
Fuente: http://php.net/manual/en/mysqli.set-charset.php

Cita:
Note:

This is the preferred way to change the charset. Using mysqli_query() to set it (such as SET NAMES utf8) is not recommended. See the MySQL character set concepts section for more information.
Un saludo