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 in
MySQL (Haven't tried another DB yet) and I'm trying to migrate to > SQLite,
this is really holding me back.
Hi David
Have you ever tried your statement as following:
SELECT * FROM table1, table2
WHERE table1.table2_id = table2.id
and (table1.value LIKE "%value%" or table1.value LIKE
"%different_value%");
khamis
I don't think I've ever tried a statement similar to that, but I have tried
very simple statements with the OR syntax and the performance was still very
bad. I will try out your idea as it may have some potential, though I have
solved the problem with UNION ALL for now. Sorry for the very slow reply, as
usual, real life has gotten in the way of coding :-).
Thanks again,
- Dave