Re: Improvong code and application

2008-11-06 Thread Tom Chiverton
On Wednesday 05 Nov 2008, Scott Stewart wrote: WHERE X = cfqueryparam value=#dynamic.variable# cfsqltype=some SQL type And in terms of having a tool do it automatically for you, you can skip the cfsqltype too. -- Tom Chiverton Helping to seamlessly enable efficient cross-media appliances

Re: Improvong code and application

2008-11-05 Thread Tom Chiverton
On Wednesday 05 Nov 2008, Toby King wrote: Just a quick question in relation to the CFQueryParam - where are you advising that I use this command. In *every single* CFQUERY. -- Tom Chiverton Helping to widespreadedly supply strategic e-services

Re: Improvong code and application

2008-11-05 Thread Toby King
Hi there Without copying and pasting the entire query can you show an example of how/where you can use the cfqueryparam in the code. Thanks in advance. On Wednesday 05 Nov 2008, Toby King wrote: Just a quick question in relation to the CFQueryParam - where are you advising that I

Re: Improvong code and application

2008-11-05 Thread Charlie Griefer
On Wed, Nov 5, 2008 at 9:02 AM, Toby King [EMAIL PROTECTED] wrote: Hi there Without copying and pasting the entire query can you show an example of how/where you can use the cfqueryparam in the code. the docs are pretty clear on the syntax. why don't you check the docs, give it a try, and

Re: Improvong code and application

2008-11-05 Thread Scott Stewart
any dynamic variable (IE: anything wrapped in ##) in the SQL statement. WHERE X = cfqueryparam value=#dynamic.variable# cfsqltype=some SQL type Toby King wrote: Hi there Without copying and pasting the entire query can you show an example of how/where you can use the cfqueryparam in the

Re: Improvong code and application

2008-11-05 Thread Jason Fisher
One example would be this query (just guessing at your datatypes, which need to match the columns in the database): CFQUERY DATASOURCE=#arguments.dsn# INSERT INTO SC_Trac_Results (TR_ResultCode, TR_CustParams,

Re: Improvong code and application

2008-11-04 Thread Toby King
Just a quick question in relation to the CFQueryParam - where are you advising that I use this command. Thanks in advance for your reply. I have a piece of code in a program which I think would be much better if placed into a CFC. Just wondering what is the best approach to take.

Re: Improvong code and application

2008-11-04 Thread Jason Fisher
The Muse had a whole series on SQL injection attacks back in July. There are other good reasons to use CFQUERYPARAM as well, but this one alone should scare the pants off anyone doing dynamic database work on the web.

Improvong code and application

2008-10-30 Thread Toby King
I have a piece of code in a program which I think would be much better if placed into a CFC. Just wondering what is the best approach to take. Want to be able to handle success and fail transactions. The code that I am looking at is shown below. Regards T cfparam name=selemailopt

Re: Improvong code and application

2008-10-30 Thread Jason Fisher
Toby, Create a file called 'member.cfc' and then copy the content below into it. Call it like so: cfset myresult = createObject(component, member).memberSave(form, request.AppDS, request.suburbID) That will send your form scope and request variables into the function and return your

Re: Improvong code and application

2008-10-30 Thread Toby King
Hi there Thanks for the reply - I ended up with something very similar. Its almost working - but getting an error (shown below) The SUBURBID argument passed to the memberSave function is not of type suburbID. If the component name is specified as a type of this argument, its possible that a

Re: Improvong code and application

2008-10-30 Thread Jason Fisher
Sorry, my bad. Change this line: cfarguemnt name=suburbID type=suburbID required=yes to this: cfarguemnt name=suburbID type=STRING required=yes ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to