|
Revision 5, 1.1 kB
(checked in by DanWilson, 17 years ago)
|
|
Initial Commit Of ModelGlue? Website (upgrade to blogcfc 511)
|
| Rev | Line | |
|---|
| [5] | 1 | <cfsetting enablecfoutputonly=true> |
|---|
| 2 | <!--- |
|---|
| 3 | Name : handlers/textbox/save.cfm |
|---|
| 4 | Author : Raymond Camden |
|---|
| 5 | Created : September 21, 2004 |
|---|
| 6 | Last Updated : March 30, 2006 |
|---|
| 7 | History : Be anal on 255 limit (rkc 10/12/05) |
|---|
| 8 | : tableprefix fix (rkc 3/30/06) |
|---|
| 9 | Purpose : Supports True/False, Yes/No |
|---|
| 10 | ---> |
|---|
| 11 | |
|---|
| 12 | <cfparam name="attributes.single" default="true"> |
|---|
| 13 | |
|---|
| 14 | <cfif len(attributes.answer)> |
|---|
| 15 | <cfquery datasource="#application.settings.dsn#"> |
|---|
| 16 | insert into #application.settings.tableprefix#results(owneridfk,questionidfk, |
|---|
| 17 | <cfif attributes.single> |
|---|
| 18 | textbox |
|---|
| 19 | <cfelse> |
|---|
| 20 | textboxmulti |
|---|
| 21 | </cfif>) |
|---|
| 22 | values( |
|---|
| 23 | <cfqueryparam cfsqltype="CF_SQL_VARCHAR" maxlength="35" value="#attributes.owner#">, |
|---|
| 24 | <cfqueryparam cfsqltype="CF_SQL_VARCHAR" maxlength="35" value="#attributes.questionidfk#">, |
|---|
| 25 | <cfif attributes.single> |
|---|
| 26 | <cfqueryparam cfsqltype="CF_SQL_VARCHAR" maxlength="255" value="#left(attributes.answer,255)#"> |
|---|
| 27 | <cfelse> |
|---|
| 28 | <cfqueryparam value="#attributes.answer#" cfsqltype="CF_SQL_LONGVARCHAR"> |
|---|
| 29 | </cfif> |
|---|
| 30 | ) |
|---|
| 31 | </cfquery> |
|---|
| 32 | </cfif> |
|---|
| 33 | |
|---|
| 34 | <cfsetting enablecfoutputonly=false> |
|---|
| 35 | |
|---|
| 36 | <cfexit method="exittag"> |
|---|