Re: [PHP-DB] extra spaces

Поиск
Список
Период
Сортировка
От Miles Thompson
Тема Re: [PHP-DB] extra spaces
Дата
Msg-id 3A3ADA7D.9ECC9ED7@sprint.ca
обсуждение исходный текст
Ответ на extra spaces  (Soma Interesting <dfunct@telus.net>)
Список pgsql-general
There's probably a trim() function in your database language. Use it in your select statement.

MySQL, for varchar fields, trims them automatically. Maybe it does it to char as well.

Miles Thompson

Soma Interesting wrote:

> I'm using PHP & PostgreSQL.
>
> All values called from the database are still padded with extra spaces from
> the column size in the database. Is this normal - I don't remember this
> happening when I was using MySQL. I thought usually the database stripped
> the extra spaces when it retrieved the values.
>
> How do you recommend dealing with this, using a PHP command to strip every
> value from the database - or can I change something in the database to have
> it strip the spaces auto magic like?
>
> -          -          -          -          -          -          -
>   -          -          -          -
> WARNING: Some experts believe that use of any keyboard may cause
> serious injury. Consult Users Guide.
>                                                                                        dfunct@telus.net
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net



В списке pgsql-general по дате отправления:

Предыдущее
От: "Robert B. Easter"
Дата:
Сообщение: Re: question
Следующее
От: Roland Roberts
Дата:
Сообщение: Re: extra spaces