Jason...

Just a side note, since we're discussing syntax and all...

I've come to prefer the concat operator to nested hashes, i.e.

#myVar['text' & var]#

is preferrable to

#myVar['text#var#']#

First off, I'm not sure about nested hash syntax like you've got
here... it may render, it may not, and it may depend on the tag in
question... there are tags like name="" attribute of cfquery that
won't take foo["bar"] to insert a query into a struct... whereas
name="foo.bar" works just fine and you end up with bar as an element
of foo. The alternative fails.

BUT, beyond that, all those hash marks are soooooo hard on the eyes...
you've got to look really close to make sure your single quotes are in
the right place, and it's just kinda blobbish. Using the concatenation
operator makes the whole thing MUCH easier to read.

Just a thought...

Laterz!

J

On 4/26/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> 
> 
> As others have pointed out but I'll reiterate, you should use the [ ]
> notation available in scoped variables.
> 
> In other words, your query would be
> 
> <CFQUERY>
> INSERT INTO mytable
> (course, degree, emp_course_id...)
> VALUES
> (     <cfqueryparam cfsqltype="char" value="#form['course#i#']#">,
>       <cfqueryparam cfsqltype="char" value="#form['degree#i#']#">,
>        <cfqueryparam cfsqltype="char" value="#form['emp_course_id#i#']#">
> )
> </CFQUERY>
> 
> If your variables are not in the form scope but rather in the variables
> scope use
> 
> value="#variables['course#i#']#">
> 
> Jason Cronk


-- 
---------------
-------------------------------------
Buy SQLSurveyor!
http://www.web-relevant.com/sqlsurveyor
Never make your developers open Enterprise Manager again.


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]


Reply via email to