Re: [sqlite] Bug or working as designed?

2008-10-29 Thread Tomas Lee
On 2008 October 29 (Wed) 03:26:45pm PDT, James Sheridan <[EMAIL PROTECTED]> wrote: > Related addendum: > > In reading it appears that MySQL treats "," as a CROSS JOIN and implements it > effectively as an INNER JOIN. > a) Is this correct? Not really, no. MySQL treats "," as a CROSS JOIN, which

Re: [sqlite] Bug or working as designed?

2008-10-29 Thread Igor Tandetnik
James Sheridan <[EMAIL PROTECTED]> wrote: > The query should have been: > > SELECT Q.* > FROM Query Q, > UserQuery UQ > WHERE Q.type = 'a' OR > (Q.id = UQ.queryID AND > UQ.userID = '1'); Well, it's the same thing: for each row in Q with Q.type = 'a', you will get as many copies of this row as the

Re: [sqlite] Bug or working as designed?

2008-10-29 Thread James Sheridan
James Sheridan wrote: > CREATE TABLE [Query] ( > [id] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, > [creatorID] INTEGER NOT NULL, > [ownerID] INTEGER NOT NULL, > [type] VARCHAR NOT NULL > ); > CREATE TABLE [UserQuery] ( > [userID] INTEGER NOT NULL, > [que

Re: [sqlite] Bug or working as designed?

2008-10-29 Thread Igor Tandetnik
James Sheridan <[EMAIL PROTECTED]> wrote: > CREATE TABLE [Query] ( > [id] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, > [creatorID] INTEGER NOT NULL, > [ownerID] INTEGER NOT NULL, > [type] VARCHAR NOT NULL > ); > CREATE TABLE [UserQuery] ( > [userID] INTEGER NOT NULL, > [queryID] INTEGER NOT

[sqlite] Bug or working as designed?

2008-10-29 Thread James Sheridan
CREATE TABLE [Query] ( [id] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, [creatorID] INTEGER NOT NULL, [ownerID] INTEGER NOT NULL, [type] VARCHAR NOT NULL ); CREATE TABLE [UserQuery] ( [userID] INTEGER NOT NULL, [queryID] INTEGER NOT NULL ); SEL