David Fowler wrote:
Query 2:
SELECT * FROM table1, table2
WHERE ((table1.value LIKE "%value%" AND table1.table2_id = table2.id)
> OR (table1.value LIKE "%different_value%" AND table1.table2_id =
table2.id)); This query (and even more complex versions of it) works i
sqlite.org
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
References: <[EMAIL PROTECTED]>
X-Virus-Scanned: amavisd-new at supernerd.com
Return-Path:
[EMAIL PROTECTED]
X-OriginalArrivalTime: 27 Jul 2005 01:51:47.0466 (UTC)
FILETIME=[BF9AD6A0:01C5924D]
Da
Really sorry guys, AS files, should indeed be AS tables, thats what does not
work. Sorry again for the copy/pasting/editing error. When I remember to
name everything correctly, I still can't select anything by table.column
sytax that is in the derived table, wether the derived table is aliased
Really sorry guys, AS files, should indeed be AS tables, thats what does not
work. Sorry again for the copy/pasting/editing error. When I remember to
name everything correctly, I still can't select anything by table.column
sytax that is in the derived table, wether the derived table is aliased
Hello again to everyone.
I'm having trouble with the following query:
SELECT tables.id FROM (
SELECT table4.location, table4.id
FROM table1
INNER JOIN table2 ON (table1.class_id = table2.class_id)
INNER JOIN table3 ON (table2.name_id = table3.name_id)
INNER JOIN table4 ON (table4.id = table3.id)
> SQLite Version 3.2.2.
> Is this a bug, or is my SQL that bad?
> Query 1:
> SELECT * FROM table1, table2
> WHERE (table1.value LIKE "%value%" AND table1.table2_id = table2.id);
> This query works perfectly, can't fault it.
> But when I do this, SQLite locks out (Command line interface, and PHP5)
Might I suggest the following --
make your query in steps, and note where it actually starts slowing down.
For example,
Step 1.
SELECT COUNT(*)
FROM t1
(took a fraction of a pico second... good)
Step 2.
SELECT COUNT(*)
FROM t1
WHERE t1.c1 = 'c1'
(took a couple of fractions of a pico
I think if you try this with MySQL MyISAM you will have the same result and
I
think this is to do with the SELECT *
I remember I used to have something similar back in the days when I tried
MySQL.
Charlie
==
I just tried adding extra conditions in
On 2005-07-25 at 13:06:42 [+0200], David Fowler
<[EMAIL PROTECTED]>
wrote:
> SELECT count(*) FROM table1
> INNER JOIN table2 ON (table1.id = table2.rel_id)
> INNER JOIN table3 ON (table3.rel_id = table2.id)
> INNER JOIN table4 ON (table3.id = table4.rel_id)
> INNER JOIN tab
On 2005-07-25 at 10:58:04 [+0200], David Fowler
<[EMAIL PROTECTED]> wrote:
> Thanks Charlie, thats exactly how I should be doing it. I would imagine
> there are some performance benefits from doing it this way too. Now I've
> just got to make it work for my select that involves six
On 2005-07-25 at 10:15:14 [+0200], David Fowler
<[EMAIL PROTECTED]> wrote:
> SELECT * FROM table1, table2
> WHERE (table1.value LIKE "%value%" AND table1.table2_id = table2.id);
> This query works perfectly, can't fault it.
> But
this statement has an extra ; which may be the error. Another thought, when
quoting string literals, it is better to use single quotes('), since double
quotes(") means identifier --column name-- first, string literal second.
John
==
Thanks for the very
SQLite Version 3.2.2.
Is this a bug, or is my SQL that bad?
Query 1:
SELECT * FROM table1, table2
WHERE (table1.value LIKE "%value%" AND table1.table2_id = table2.id);
This query works perfectly, can't fault it.
But when I do this, SQLite locks out (Command line interface, and PHP5)
Query 2:
13 matches
Mail list logo