There are a few things that need to be considered here, first are they
required fields (meaning can any be left blank). But if it was me
writing the code, I would do the following!!
First convert the string into a full name variable, this way you will
not need to do any other processing later. Also from the length, you
will know how the user has entered the name.
For example:-
Andrew - Means I only ever typed my first name.
Andrew Scott - Means I never typed my middle name.
And so on... (But this checking can be done before going into the DB)
Now because this is being stored into a memo field I would delimit the
string with a character like the carot (^) or something else that would
not normally be typed in by the user...
So you would end up with something in the database like this:-
Andrew Scott^Bill Gates^God^Jesus
>From here when being pulled out you already then have the full name that
the user has then typed in.
HTH
Regards
Andrew Scott
Senior Coldfusion Application Developer
-----Original Message-----
From: Peter Tilbrook [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 06, 2001 11:20 AM
To: CF-Talk
Subject: List question
I have three "memo" database fields delimited by commas:
1. FirstName (eg: John,Michael,James)
2. MiddleName (eg: Pat,Tony,Peter)
3. LastName (eg: Smith,Affleck,Cousins)
So the three names should come out as:
John Pat Smith
Michael Tony Affleck
James Peter Cousins
How can I extract these and wrap them up into a single variable? (so I
can
insert each name into a form as a seperate record).
Thanks!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists