Ver Mensaje Individual
  #9 (permalink)  
Antiguo 22/06/2007, 04:04
Avatar de RUX
RUX
 
Fecha de Ingreso: enero-2004
Ubicación: Las Palmas de Gran Canari
Mensajes: 566
Antigüedad: 20 años, 3 meses
Puntos: 0
Re: Tildes y ñ en bd bien, luego mal

Hola, se puede hacer, te pongo un mini-ejemplo:

Código PHP:
$mal = array('á''é''í''ó''ú''ñ');
$bien = array('á''é''í''ó''ú''ñ');
$consulta mysql_query("SELECT id, texto_utf FROM tabla");
while (
$extraer mysql_fetch_assoc($consulta)){ 
$extraer['texto_utf'] = str_replace($mal$bien$extraer['texto_utf']);
mysql_query("UPDATE tabla SET texto_utf = '".$extraer['texto_utf']."' WHERE id = '".$extraer['id']."'");

Ojo, has una copia de seguridad antes, por si acaso me/te equivoques.

SALUDOS
Ruymán Trujillo
__________________
Rux.es - Sitio Personal | IslaRock.com - Todo Rock