That should throw a SQL error. What you need to do is create the list
outside of your query statement.
<cfset keywords = name & 'and' & address & 'and' & phone>
<CFQUERY name="insert" datasource="search">
INSERT INTO search(keywords)
VALUES('#keywords#')
</CFQUERY>
--K
====================
Katrina Chapman
Consultant
Ameriquest Mortgage
Anthony
Israel-Davis To: "'[EMAIL PROTECTED]'"
<[EMAIL PROTECTED]>
<anthony@trip cc:
wire.com> Subject: RE: Inserting Multiple Values
into One Database Field
06/23/00
03:06 PM
Please
respond to
cf-talk
Try this:
<CFQUERY datasource="search">
INSERT INTO search(keywords)
VALUES('#name#,#address#,#phone#')
</CFQUERY>
remove the "AND"s and wrap the whole thing in single quotes. Hope that
helps
ant
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 23, 2000 1:56 PM
To: [EMAIL PROTECTED]
Subject: Inserting Multiple Values into One Database Field
Ok, what i am trying to do is add a column in my database that would
contain
"Keywords" for a search.
What i am trying to do is add values from the data entered in the form from
the previous page to one field in the database
I only get a value of "-1" ????? is there something i am doing wrong???
<CFQUERY datasource="search">
INSERT INTO search(keywords)
VALUES('#name#' AND '#address#' AND '#phone#')
</CFQUERY>
Help?
-kev
----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.