RE: [tcphp] Hella fun project I'm about to throw at some tech col lege students
| From: | Rafi Sheikh | Date: | Mon, 03 May 2004 01:17:25 +0000 |
| Subject: | RE: [tcphp] Hella fun project I'm about to throw at some tech col lege students | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-34244@lists.php.net to get a copy of this message | ||
Hi List. A quick question. I have some categories that are really long
and I would like to re-word or re-format them when I am bring data in from a
DB. Now which would be better:
Do it with PHP
or
Do it with MySQL
Any suggestions as to how to?
Example:
A column name: Customer --> VARCHAR
Values in Customer: "USA-North Upper ABVDFR Co. and Sons"
I would like to re-word it for example: ABVDFR Co.
I know I could use SUBSTRING or MID, or replace but the issue is since the
column is a VARCHAR, the length of the value may change from row to row, for
example: one row it maybe 20, in the next 13 and so on so forth. I also
thought that if I could use a length statement and come up with a
formula...but so far no success....any suggestions?
Thx in Adv.
RS
This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity to
which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified that
any dissemination, distribution or copying of this e-mail is prohibited. If
you have received this e-mail in error, please notify the sender by replying
to this message and delete this e-mail immediately.