|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
queryparam and triming on insert
My hosting provider requires that all queries have a queryparam. including the INSERT INTO queries. I have tried to add them but am getting no where fast.
I also need to trim all the form fields before inserting the info into the DB, can I do all of this in the same insert query. if so can someone give me an example. Here is my test query. Obviously it's completly wrong. INSERT INTO membership (first_name) VALUES ('<cfqueryparam value="#trim(form.firstname)#" cfsqltype="cf_sql_char">') Thanks in advance. |
|
#2
|
|||
|
|||
|
Yes you can do that. And aside from the fact that you shouldn't be enclosing the <cfqueryparam> tag in quotes (the driver handles that for you based on the SQL data type you specify), your query looks fine.
__________________
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 |
|
#3
|
|||
|
|||
|
That worked like a charm.
![]() Glad to see I wasn't too far off. also can't believe I forgot about the quotes Thanks a million! |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > queryparam and triming on insert |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|