RE: RE: [tcphp] Hella fun project I'm about to throw at some tech college students

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

If the reformating is complex - ABVDFR Co is in the middle of the field  -
then php

$bits = explode (" ", $FieldValue ) ;

then each element of $bits is a word, making reworking it easier

Just my 2p worth :)

Peter



> -----Original Message-----
> From: Rafi Sheikh [mailto:Rafi.Sheikh@xxxxxxxxxxx]
> Sent: 03 May 2004 02:17
> To: talk@xxxxxxxxx; php-db@xxxxxxxxxxxxx; talk@xxxxxxxxxxxxxxx
> Subject:  RE: [tcphp] Hella fun project I'm about to throw at
> some tech college students
>
>
> 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.
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux