Ok - typical...

30 seconds and one  <cfset qContacts.setDistinct(true)> statement later  and
I realise I am being an utter numpty...




On 27/11/06, Stephen Moretti <[EMAIL PROTECTED]> wrote:

Basically, I can generate a query happily enough, but I need to make sure
that only distinct records are returned.

I'm probably just being dense, but how do I use getDistinct() ?

I have :

        <cfset var oContacts=application.reactor.createGateway
('tblcontacts')>
        <cfset var qContacts = oContacts.createQuery ()>
        <cfset qContacts.returnObjectFields
('tblcontacts','ID,firstname,surname,organisation')>
        <cfset qContacts.getWhere().setMode(
arguments.thisSearch.getSearchType())>

then a bunch of getWhere() statements and then I have :

<cfset qContacts.getDistinct()>

then my method does:

<cfreturn oContacts.getByQuery(qContacts) />

At the minute I'm getting :*

Message* Element INSTANCE.DISTINCT is undefined in VARIABLES.
*Tag Context* D:\Workspace\Reactor\reactor\query\query.cfc (683)


TIA

Stephen



-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to