I am have been using
the same naming convention and names for my DB columns as for my form fields (or
vice versa), this allows for simple form population like
following
<cfquery
name="qMyQuery" datasource..........>
SELECT blah,
blah
FROM.................
</cfquery>
<cfloop index="column" list="#qMyQuery.columnList#">
<cfset setVariable("form.#variables.column#", qContact[variables.column])>
</cfloop>
<cfset setVariable("form.#variables.column#", qContact[variables.column])>
</cfloop>
I can already hear
people saying "but then all crackers know your column names" etc.
etc.
I am aware of this,
personally I think this is something not to really worry about, as they can
easily be guessed unless you are using some very cryptic names for your columns.
Second, if they have come to a point where they could actually do something with
those column names it would be just as easy to get them at that
stage.
Another advantage is
that you never have to mix and match form fields with column
names....
Anyway, what I am
looking for is negativity from you guys ;-)) Tell me why I should really not do
this...
Taco
Fleur
Tell me and I will forget
Show me and I will remember
Teach me and I will learn
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004
