Re: Compare column entries in database query

2007-08-03 Thread [EMAIL PROTECTED]
Hi Russ! Thanks for the info! Saves me from trying around more. Yours, Thomas On Aug 2, 1:25 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 8/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > I want to find all entries in a database where two specific fields are > >

Re: Compare column entries in database query

2007-08-02 Thread Russell Keith-Magee
On 8/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I want to find all entries in a database where two specific fields are > equal: > > mytable.objects.filter(column_a='column_b') At present, the answer is unfortunately 'you can't do this' (unless you use a hack like the one you

Compare column entries in database query

2007-08-02 Thread [EMAIL PROTECTED]
Hi everybody! I want to find all entries in a database where two specific fields are equal: mytable.objects.filter(column_a='column_b') But this gives me no results at all. I now managed to get it done with a .extra(), but I was wondering if this is the only possible solution. All examples in