Hi!

I need help on implementing a query that performs a search for items under
nested categories. An example is on ebay search where you can restrict your
search by selecting a subcategory and you only get items under that
category/subcategories.
Do I have to first get a list of all subcategories under the selected
category and then loop OR's or is there a better way?

Some example tables:

| id | pid | category |
  1     0    cat1
  2     0    cat2
  3     1    cat3
  4     1    cat4
  5     2    cat5

| id | id_category | item |
  1    3             item1
  2    4             item2
  3    5             item3


(Running Mysql 4.1.9 and PHP 5.0.4).
Thanks in advance.
Apologies for my bad English.
Pedro.




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to