🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #279

Re: Syntax para reemplazar acentos en tabla MySQL?

#279
From: _Rodrigo_
Date: Thu, 03 Dec 2009 07:08
51 lines
3195 bytes
On 2 dic, 11:00, "Christian Szita" <christ...@deadspam.com> wrote:
> Estimados,
>
> No soy muy ducho en lo que a sintaxis de bases de datos se refiere; necesito
> hacer algo muy sencillo..
>
> Que consulta SQL tengo que correr en phpMyAdmin para reemplazar todos los á
> é í ó ú ñ Ñ por sus equivalentes sin acento?
>
> la tabla es products_description y la columna con el nombre es products_name
>
> Dado que activé el SEO en OsCommerce donde la URL es compuesta por el nombre
> del producto (en vez de product_description.php?id=xxx es
> increíble-inalámbrico-a999.html) se me produjo un problema con los acentos
> en el nombre del producto.
>
> gracias :)

Quizás te podria servir algo así:

update products_description set products_name = replace(products_name,
‘á’, ‘a’);
update products_description set products_name = replace(products_name,
‘é’, ‘e’);
update products_description set products_name = replace(products_name,
‘í’, ‘i’);
update products_description set products_name = replace(products_name,
‘ó’, ‘o’);
update products_description set products_name = replace(products_name,
‘ú’, ‘u’);
update products_description set products_name = replace(products_name,
‘Á’, ‘A’);
update products_description set products_name = replace(products_name,
‘É’, ‘E’);
update products_description set products_name = replace(products_name,
‘Í’, ‘I’);
update products_description set products_name = replace(products_name,
‘Ó’, ‘O’);
update products_description set products_name = replace(products_name,
‘Ú’, ‘U’);
update products_description set products_name = replace(products_name,
‘ñ’, ‘n’);
update products_description set products_name = replace(products_name,
‘Ñ’, ‘N’);

suerte!
Technical Details
Message-ID: <d4653c54-ef73-4bf9-baa5-728abc503e3a@a32g2000yqm.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!a32g2000yqm.googlegroups.com!not-for-mail
References: <hf5rtf$acj$1@news.nivel5.cl>

Show Full Headers
Complete Article Headers
X-Google-Thread: e499fe1f24,73878f3fe7ee3842
X-Google-Attributes: gide499fe1f24,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: SPANISH,CP1252
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!a32g2000yqm.googlegroups.com!not-for-mail
From: _Rodrigo_ <rmunozc@gmail.com>
Newsgroups: chile.comp.programacion
Subject: Re: Syntax para reemplazar acentos en tabla MySQL?
Date: Wed, 2 Dec 2009 23:08:08 -0800 (PST)
Organization: http://groups.google.com
Lines: 51
Message-ID: <d4653c54-ef73-4bf9-baa5-728abc503e3a@a32g2000yqm.googlegroups.com>
References: <hf5rtf$acj$1@news.nivel5.cl>
NNTP-Posting-Host: 190.108.133.168
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1259824088 30525 127.0.0.1 (3 Dec 2009 07:08:08 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 3 Dec 2009 07:08:08 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: a32g2000yqm.googlegroups.com; posting-host=190.108.133.168; 
 posting-account=hP7L0QoAAABLOCZBGpRuamfRjp2wV6_x
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-CL; rv:1.9.1.5) 
 Gecko/20091102 Firefox/3.5.5 GTB6 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe)