It usually best not to store data like this in one field though, rather
store it in the 3 seperate fields and combine them in the query when you
extract the data from the database or in your application. You may find in
the future that you need to get 'Mr Smith' rather than 'Mr John Smith' from
the database, and this can be a right pain if you're storing all the data in
one field.
HTH
Alex

-----Original Message-----
From: Pascal Peters [mailto:[EMAIL PROTECTED]
Sent: 30 September 2003 15:30
To: CF-Talk
Subject: RE: Combining Form Fields ?


INSERT INTO tbl_contact (contactname,...)
VALUES (
<cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.Title#
#form.Forename# #form.Surname#">,
...
)
-----Original Message-----
From: Ian Vaughan [mailto:[EMAIL PROTECTED]
Sent: dinsdag 30 september 2003 16:22
To: CF-Talk
Subject: Combining Form Fields ?


I have three form fields that will make up a name, these are Title,
Forename and Surname.

Is it possible to combine the contents of these three form fields so it
is entered into 1 database field.

So basically is it possible for the form elements below to be entered as
'Mr Ian Vaughan' in the contactname database field ?

<tr>
<td width="15%" class="sectionSummary">Title</td>
<td width="85%">
              
<select size="1" name="title">
<option selected>Select a Title</option>
<option value="Mr">Mr</option>
<option value="Mrs">Mrs</option>
<option value="Ms">Ms</option>
<option value="Dr">Dr</option>
<option value="Rev">Rev</option>
</select></td>
</tr>

<tr>
<td width="15%" class="sectionSummary">Forename</td>
<td width="85%"><input name="forename" class=mini size="30"></td>
</tr>

<tr>
<td width="15%" class="sectionSummary">Surname</td>
<td width="85%"><input name="surname" class=mini size="30"></td>
</tr>
  _____  


  _____  


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to