|
Home > Archive > MySQL Server Forum > August 2005 > Re: Query causes (Errcode: 28)
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: Query causes (Errcode: 28)
|
|
| andreas.maurer1971@web.de 2005-08-05, 7:23 am |
|
Felix Geerinckx schrieb:
> On 04/08/2005, me wrote:
>
>
> Are you sure you don't want
>
> and (pd.products_name like '%3219%' or p.products_model like '%3219%')
>
> here?
>
> --
> felix
Hi,
I don't know if I'm right but could it be that you produce a Cartesian
Product with your query?
Maybe it might help to use a real (INNER) JOIN like
SELECT p. products_ship_price,
p.products_id, ..., p2c.categories_id
FROM products p INNER JOIN products_description
pd ON p.products_id =
pd.products_id
INNER JOIN products_to_categori
es p2c ON p.products_id =
p2c.products_id
WHERE pd.language_id = '1' AND pd.products_name like '%3219%' OR
p.products_model like '%3219%'
ORDER BY pd.products_name
Please note that I am NOT SURE which conditions are the most important
ones and whether or not you will have to use brackets ("(..)") in order
to group the WHERE... AND.. OR.. parts in order to get the desired
result.
As well I'm NOT SURE if I got all JOINS correct! Please double check
before you use it!
Anyway, I'm pretty sure that you have to use the JOIN keyword in order
to make your query faster.
HTH,
Andy
| |
|
|
> As well I'm NOT SURE if I got all JOINS correct! Please double check
> before you use it!
>
> Anyway, I'm pretty sure that you have to use the JOIN keyword in order
> to make your query faster.
>
> HTH,
>
> Andy
>
Andy Thx a few tweaks and it did the trick!!!!
Eric
|
|
|
|
|