Title: Message

I agree – you can’t rely on people not guessing your column names. I call them the same where possible.

 

You can btw write:

 

<cfset form[variables.column] = qContact[variables.column]>

 

 

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Taco Fleur
Sent: Thursday, 12 February 2004 2:53 p.m.
To: CFAussie Mailing List
Subject: [cfaussie] Opinions on naming form fields the same as db columns...

 

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>

 

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

Blog http://www.tacofleur.com/index/blog/
Methodology http://www.tacofleur.com/index/methodology/


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

---
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

Reply via email to