>- see footer for list info -<
Verifies the data type of a query parameter and, for DBMSs that support bind 
variables, enables ColdFusion to use bind variables in the SQL statement. Bind 
variable usage enhances performance when executing a cfquery statement multiple 
times.
This tag is nested within a cfquery tag, embedded in a query SQL statement. If 
you specify optional parameters, this tag performs data validation.
Macromedia recommends that you use the cfqueryparam tag within every cfquery 
tag, to help secure your databases from unauthorized users. For more 
information, see:


<cfquery 
   name = "query_name"
   dataSource = "ds_name"
   ...other attributes...
   SQL STATEMENT column_name = 
   <cfqueryparam value = "parameter value"
      CFSQLType = "parameter type"
      maxLength = "maximum parameter length"
      scale = "number of decimal places"
      null = "Yes" or "No"
      list = "Yes" or "No"
      separator = "separator character">
   AND/OR ...additional criteria of the WHERE clause...
   </cfquery>

<!--- This example shows cfqueryparam with VALID input in Course_ID. --->
<h3>cfqueryparam Example</h3>
<cfset Course_ID = 12>
<cfquery name = "getFirst" dataSource = "cfsnippets">
   SELECT * 
   FROM courses
   WHERE Course_ID = <cfqueryPARAM value = "#Course_ID#"
   CFSQLType = "CF_SQL_INTEGER"> 
</cfquery>
<cfoutput query = "getFirst">
   <p>Course Number: #Course_ID#<br> Description: #descript#</p>
</cfoutput>
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-b20.htm
----- Original Message ----- 
From: "Peter Donahue" <[EMAIL PROTECTED]>
To: "Jolly Green Giant" <[EMAIL PROTECTED]>; "Coldfusion Development" 
<[email protected]>
Sent: Monday, January 31, 2005 9:03 PM
Subject: [CF-Dev] cfqueryparam tag


> >- see footer for list info -<
> 
> Hello again everyone,
> 
>     On which pages do I place the <
> <cfqueryperam> tag.  Does this go on the form pages where the user is
> supposed to enter their data, or on all pages I wish to protect.   I wish he
> had spent time on this subject during our class, and explained how these
> tags are used, if this tag is a single tag, or if it's one used in pairs,
> how to define parameters within the tag itself, you get the idea.  I could
> sure use a primmer, or some sample code of how it's used.  It was during our
> last class meeting when my instructor hacked this page, but he didn't give
> us the exact tag information.  If you can send me sample code, or direct me
> to articles, and examples of how to use this tag I'll appreciate that very
> much, and can go on to finish creating this website.  Thanks again for your
> help.
> 
> 
> 
> Peter Donahue
> 
> 
> 
> 
> _______________________________________________
> 
> For details on ALL mailing lists and for joining or leaving lists, go to 
> http://list.cfdeveloper.co.uk/mailman/listinfo
> 
> --
> CFDeveloper Sponsors:-
> >- Hosting provided by www.cfmxhosting.co.uk -<
> >- Forum provided by www.fusetalk.com -<
> >- DHTML Menus provided by www.APYCOM.com -<
> >- Lists hosted by www.Gradwell.com -<
> >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
>
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to