self-platform-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Self-platform-dev] error in file manager


From: Federico Heinz
Subject: Re: [Self-platform-dev] error in file manager
Date: Sat, 29 Mar 2008 12:20:19 -0300

On 29/03/2008, Nagarjuna wrote:
> On Fri, Mar 28, 2008 at 01:14:32PM -0300, address@hidden wrote:
> > > today I see resources uploaded by others also in my filemanager.
> > I think there is a problem with the SQL query in the getAllResourcesofUser
> > method in commonMethods.py. There is the following query:
> >     queryResult = cur.execute("select nid from djview_o where uid = "+
> > str(uid) +" and instanceof = "+imgresid+" or instanceof =
> > "+audiresid+" or instanceof = "+vidresid+" or instanceof =
> > "+otherresid+";")
> > where there is no association for 'and' and 'or'; I think what is wanted
> > here is:
> >     queryResult = cur.execute("select nid from djview_o where uid = "+
> > str(uid) +" and (instanceof = "+imgresid+" or instanceof =
> > "+audiresid+" or instanceof = "+vidresid+" or instanceof =
> > "+otherresid+");")
> are my eyes missing something?  I see no difference between the two queries? 
> Any way, we will investigate this on monday.  Bipin, please check this up.

You are missing the paranthesis around the "or", in order to override the
default precedence of "and" over "or".

        Fede

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]