让它变得简单,希望你们能帮助和理解
<cfsavecontent variable="sContent">
<cfoutput>
here i will have alot of Text will needed to INSERT SELECT into database
</cfoutput>
<cfsavecontent>
<!--- perform insert select --->
<cfquery name="Inserting" datasource="#data#">
insert table1 (content)
select <cfqueryparam value = "#sContent#" CFSQLType = "CF_SQL_BLOB">
from dual
</cfquery>
我使用blob的原因,因为我插入数据库的内容包含大量文本。 这是插入blob数据的正确方法吗?
答案 0 :(得分:0)
<form role="form" method="post" class="form-horizontal" id="leave_days">
<div class="form-group">
<label class="col-sm-2 control-label">Category Name</label>
<div class="col-sm-9">
<input type="text" name="txt_catname" id="txt_catename" class="form-control" placeholder="Enter Category Name" />
</div>
</div>
<div class="col-sm-9">
<button type="button" data-style="expand-right" id="btn_reg" class="btn btn-info ladda-button">
</div>
</form>
或使用cfscript:
<cfquery name="Inserting" datasource="#data#">
INSERT INTO table1 (
content
) VALUES (
<cfqueryparam value = "#sContent#" CFSQLType = "CF_SQL_BLOB" />
)
</cfquery>