Ohh.
So you want to select all items that belong to a parent category?
And how do you know if a item belong to a parent category?
Don't you mean that you want to select all subcategories and their items
by only specifying a parent category?
> -----Ursprungligt meddelande-----
> Fr=E5n: Bill [mailto:bige88fan@c...]
> Skickat: den 21 oktober 2002 03:59
> Till: professional php
> =C4mne: [pro_php] MySQL join question AGAIN!
>
>
> What I have been trying to do for the past to hours is this.
> As some of
> you know, I have been working with categories. And now that I have
> accomplished almost everything so far with the help of you
> guys. There is
> another thing that I need to know. What I am trying to do is this...
>
> I need to get how many items are stored in the main category
> with a table
> structure like this...
>
> tbl_Items structure:
> Name: Que Tip
> Subcatid: 1
>
> tbl_subcats
> name: Body Stuff
> parentid: 1
>
> tbl_parents
> id: 1
> name: Health stuff
>
> I hope you can understand where this is going...I could do it
> in multiple
> queries I know..but is it possible to accomplish this is ONE
> query? Using
> the example above, I would like to know how to select all of
> the Items in
> tbl_Items that belong to the PARENT category...NOt the
> sub-category. Is
> this possible? Thanks much-
>
> Bill
>
> p.s my son uses this login name to post questions about
> programming to, so
> don't get confused when you see the name "kyle" under bige88fan.
>
>