What I am I doing wrong?
<cfset ormService = viewstate.getValue("ormService")>
<cfset gw = ormService.createGateway("recurringPayments")/>
<cfset query1 = gw.createQuery() />
<cfset query2 = gw.createQuery() />
<cfset q = gw.createQuery() />
<cfset query1.GETWHERE().isltField(OBJECTALIAS="recurringPayments",
fieldAlias="paymentcount",
compareToObjectAlias1='recurringPayments',
compareToFieldAlias1='maxPayments'
)>
<cfset query1.GETWHERE().isGte(OBJECTALIAS="recurringPayments",
fieldAlias="endOn",
value='#dateformat(now(),'mm/dd/yyyy')#'
)>
<cfset query1.GETWHERE().isLte(OBJECTALIAS="recurringPayments",
fieldAlias="startON",
value='#dateformat(now(),'mm/dd/yyyy')#'
)>
<cfset firstDate = '#dateformat(now(),'mm')#/01/#year(now())#'>
<cfset lastDate = '#dateformat(now(),'mm')#/#daysinmonth(now())#/
#year(now())#'>
<cfset query2.GETWHERE().isLt(OBJECTALIAS="recurringPayments",
fieldAlias="lastrun",
value='#firstDate#'
)>
<cfset query2.getWhere().setMode('or')>
<cfset query2.getWhere().isNull(OBJECTALIAS="recurringPayments",
fieldAlias="lastrun"
)>
<cfset q.GETWHERE().addWhere(query1.getWhere())>
<cfset q.GETWHERE().addWhere(query2.getWhere())>
<cfdump var="#gw.getbyquery(q)#">
here is the error I am getting
Message The element at position 1 cannot be found.
Detail
Extended Info
Tag Context C:\Inetpub\mappings\reactor\query\query.cfc (46)
On Jun 18, 2007, at 2:34 AM, Tom Chiverton wrote:
On Sunday 17 Jun 2007, Matthew Graf wrote:
I have another question about this query is there a way make the
where look like this with parenthesis
The trick there is to create more than one Where object in the Query:
http://thefalken.livejournal.com/38511.html
--
Tom Chiverton
Helping to biannually extend leading-edge features
on: http://thefalken.livejournal.com
****************************************************
This email is sent for and on behalf of Halliwells LLP.
Halliwells LLP is a limited liability partnership registered in
England and Wales under registered number OC307980 whose registered
office address is at St James's Court Brown Street Manchester M2
2JF. A list of members is available for inspection at the
registered office. Any reference to a partner in relation to
Halliwells LLP means a member of Halliwells LLP. Regulated by the
Law Society.
CONFIDENTIALITY
This email is intended only for the use of the addressee named
above and may be confidential or legally privileged. If you are
not the addressee you must not read it and must not use any
information contained in nor copy it nor inform any person other
than Halliwells LLP or the addressee of its existence or contents.
If you have received this email in error please delete it and
notify Halliwells LLP IT Department on 0870 365 8008.
For more information about Halliwells LLP visit www.halliwells.com.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- --
Reactor for ColdFusion Mailing List
[EMAIL PROTECTED]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[EMAIL PROTECTED]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --