php-db | 2000121
Date: 12/15/00
- Next message: Michael Brunson: "Re: [PHP-DB] Mysql Bigint"
- Previous message: JJeffman: "Re: [PHP-DB] Tables"
- In reply to: Soma Interesting: "[PHP-DB] extra spaces"
- Next in thread: Roland Roberts: "[PHP-DB] Re: [GENERAL] extra spaces"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 <email protected>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe <email protected>
> For additional commands, e-mail: php-db-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Michael Brunson: "Re: [PHP-DB] Mysql Bigint"
- Previous message: JJeffman: "Re: [PHP-DB] Tables"
- In reply to: Soma Interesting: "[PHP-DB] extra spaces"
- Next in thread: Roland Roberts: "[PHP-DB] Re: [GENERAL] extra spaces"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

