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

Popular posts from this blog

Falang and too many redirects - Joomla! Forum - community, help and support

Infinite loop detected in JErrorInfinite loop detected in JError - Joomla! Forum - community, help and support

logged out from joomla! - Joomla! Forum - community, help and support