MySQL Forums
Forum List  »  Optimizer & Parser

Re: Help with a very slow select query
Posted by: Francisco Javier Morales López de Gamarra
Date: February 02, 2011 06:51AM

Sorry Rich.

Thanks you very much .. but I think that I have not explain well my problem ... your sql query works fine .... BUT I have the following problem ...

Categories table has two levels (nivel) and categories on the level 1 has a father (padre) that is the id_categoria of the level 0 ...

with your select I can get the total number of items on a categy but it does not count items that are on the level 1 and that their father is the category that I am counting ...

I just have 2 levels of categories, level 0 and level 1 (nivel 0 and nivel 1)

any idea?? Could I count all the items in all the categories and that the count has the children categories to??

Thanks a million



Edited 2 time(s). Last edit at 02/02/2011 07:01AM by Francisco Javier Morales López de Gamarra.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Help with a very slow select query
1205
February 02, 2011 06:51AM
1241
February 02, 2011 10:24AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.