You are here: Re: trim invisible chars « PHP SQL « IT news, forums, messages
Re: trim invisible chars

Posted by J.O. Aho on 01/16/07 13:13

severin wrote:
> Thanks J.O. Aho for your answer,
>
> My question is bad written.
>
> Actually, i wonder about the difference between
> "trim" : the php function
> and "trim" the mysql function.

OK, then the answer should be different.

> but the sql request:
> $sql = "update mybase set name = trim( name ) "
> //(here trim is the mysql function)
> mysql_query( $sql )
>
> makes the field 'name' of 'mybase' whithout spaces but keeps carriage
> return,tab... The mysql trim function only skips spaces.

The MySQL documentation is few wording about trim
http://dev.mysql.com/doc/refman/5.0/en/string-functions.html

I guess that it don't regard \n and \r as whitespaces


--

//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация