ColdFusion ORM
i have query should filter clause condition depends on url parameter page?
with cfquery:
<cfquery name="getuser" datasource="sample">
select *from users
<cfif url.type eq 1>userid=123<cfelse>userid=456</cfif>
</cfquery>
the same query tryinng write ormexecutequery, failing write it.
please me on this.
thanks in advance
try this:
ormexecutequery("from users (#url.type# = 1 , userid = 123) or (#url.type# <> 1 , userid=456)")
More discussions in ColdFusion
adobe
Comments
Post a Comment