|
Posted by VooDoo on 11/04/05 12:02
It works! thanks a lot for your answer!
cya
VooDoo
"Ewoud Dronkert" <firstname@lastname.net.invalid> a ιcrit dans le message de
news: sakjm11q842meqee2opin3krs6lrb5bn1o@4ax.com...
> VooDoo wrote:
>> How can i do an update on this table to replace only the characters
>> 'ι' or 'θ' by a 'e'.
>
> In PHP:
>
> $subject = 'somι linθ';
> $search = 'ιθ';
> $replace = 'ee';
> $updated = strtr($subject, $search, $replace);
>
> or
>
> $subject = 'somι linθ';
> $search = array('ι', 'θ');
> $replace = 'e';
> $updated = str_replace($search, $replace, $subject);
>
> But I guess you need a SQL query ("table with a field"). Better ask in
> comp.databases.mysql or have a look at
> http://dev.mysql.com/doc/refman/4.1/en/string-functions.html It might be
>
> UPDATE t1 set f1 = REPLACE(REPLACE(f1, 'θ', 'e'), 'ι', 'e')
>
> --
> E. Dronkert
Navigation:
[Reply to this message]
|