Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: MySQL join question AGAIN!


Message #1 by "Bill" <bige88fan@c...> on Mon, 21 Oct 2002 01:59:06
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. 

  Return to Index