Thanks Rob, that takes care of the problem. I used cfsqltype="CF_SQL_LONGVARC
Main Topics
Browse All TopicsI'm using MySQL. I have a form with an HTML editor in two textarea fields. So the textareas output HTML code, which I want to store in the database. Here's the query i'm using to update the table:
<cfquery name="FeaturedMemberUpdate
update tbl_members
set FeaturedExperiences = '#form.Experiences#' and FeaturedBiography = '#form.Biography#'
where PersonsID_FK = #session.auth.personsid#
</cfquery>
Here's what I get when I dump the form:
<p>test</p>
Here's the error I get:
Error Executing Database Query. Truncated incorrect DOUBLE value '
test
'
I've tried using HTMLEditFormat in the query, like this:
set FeaturedExperiences = '#HTMLEditFormat(form.Expe
This is what then gets stored in the database:
<p>test</p>
But i can't figure out a way to get that out of the database and display it properly on the page. If I just wrap it in cfoutput, it displays the angle brackets as text on the page rather than including them as HTML. If I include HTMLEditFormat or HTMLCodeFormat in the output block, it displays the < etc. as text.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: rob_lorentzPosted on 2006-08-14 at 09:00:03ID: 17311174
try using the <cfqueryparam> tag.
1" datasource="maindata"> cfsqltype="CF_SQL_VARCHAR" >, > nsid#" cfsqltype="CF_SQL_INTEGER" >
Also, you have a syntax error in your update statement. When updating multiple fields, seperate the fields with a comma, not 'and'.
try this......
<cfquery name="FeaturedMemberUpdate
update tbl_members
set FeaturedExperiences = <cfqueryparam value="#form.Experiences#"
FeaturedBiography = <cfqueryparam value="#form.Biography#" cfsqltype="CF_SQL_VARCHAR"
where PersonsID_FK = <cfqueryparam value="#session.auth.perso
</cfquery>