<cfset userRecord = reactor.createRecord("table") />
<cfif boolean statement>
<cfset userRecord.load(column1)>
</felse>
<cfset userRecord.load(column2)>
</cfif>
I am not sure introducing logic into the load method really seems pertinent. Introducing the business logic idea into the load method would really defeat the idea of keep business from the model interface.
Teddy
On 9/28/06, Sal Valverde <[EMAIL PROTECTED]> wrote:
Hi folks, Im sure this is a stupid question, but I'm having a hard time wrapping my head around this issue. What Im trying to do is load a record object based off of a conditional statement... so for instance:
I have one form field value that I pass, but two table fields I want to check that value against before loading the record object...
Example:
<cfset var email = arguments.event.getValue("email") />
<cfset userRecord = reactor.createRecord("table").load(column1 = #email# OR column2 = #email#) />
Obviously the OR operator is something theoretical, but essentially this is what I wanna pull off. I know you can pass multiple name/value pair params to the load method, but that essentially does an AND.
Can someone give me a hand, I'm open to criticism if this question deserves a drop kick and removed from the mailing list? haha ;(
thanks
sal
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
<cf_payne />
Blog: http://cfpayne.wordpress.com/
Atlanta CFUG: http://www.acfug.org
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
