|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
which one is a better practice?
<cfquery ....> insert into ... values (<cfqueryparam value="..." cfsqltype="cf_sql_integer" > </cfquery> or <cfquery ....> insert into ... values (#FORM.myId#) </cfquery> in other words, is it efficient to use <cfqueryparam> in an insert ? thanks for the help |
|
#2
|
|||
|
|||
|
The best practice is to always use bind variables (<cfqueryparam>) everywhere you can. Not only do they perform better, but they are more secure and prevent SQL injection attacks.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > which one is better practice? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|