Re: find conditions comparing two fields

2009-09-16 Thread George
Nice, that worked. Thanks! On Sep 15, 5:56 pm, brian wrote: > Try: > > $conditions = array('User.id = User.parent_id'); > > On Tue, Sep 15, 2009 at 5:51 PM, George wrote: > > > This seems like a simple thing to do, but I haven't been able to > > figure out how to write the find conditions array

Re: find conditions comparing two fields

2009-09-15 Thread brian
Try: $conditions = array('User.id = User.parent_id'); On Tue, Sep 15, 2009 at 5:51 PM, George wrote: > > This seems like a simple thing to do, but I haven't been able to > figure out how to write the find conditions array to do it. Basically, > I want to run a query where I check whether one fi

find conditions comparing two fields

2009-09-15 Thread George
This seems like a simple thing to do, but I haven't been able to figure out how to write the find conditions array to do it. Basically, I want to run a query where I check whether one field in the record equals another field in the same record. A simple illustration in SQL: SELECT * FROM users as