Re: [PHP-DB] RE: [tcphp] Hella fun project I'm about to throw at some tech col lege students

2004-05-03 Thread David T-G
Rafi --

...and then Rafi Sheikh said...
% 
% 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:

Can you describe an algorithm for doing so?  Your example appears fairly
arbitrary -- that is, I can guess that Co is Company and so whatever is
before it is the company name and otherwise hypothesize that 'USA North
Upper" is a region and thus *not* part of the company name, but until you
pin down some sort of an algorithm you needn't try to choose between
languages.  You may end up having to go with prolog :-)


Good luck & HAND

:-D
-- 
David T-G
[EMAIL PROTECTED]
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


[PHP-DB] RE: [tcphp] Hella fun project I'm about to throw at some tech col lege students

2004-05-02 Thread Rafi Sheikh
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 successany 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.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php