If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > hierarchical database with permissions

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-13-04, 20:44
chrispadfield chrispadfield is offline
Registered User
 
Join Date: Jul 2003
Posts: 3
hierarchical database with permissions

Hi there, hope someone can help

I have a standard hirechal database of categories and links.

However, I also have permissions to view certain categories. I have a table like this:

| usergroup | categoryid

so for a user of usergroup X they need an entry in the user_cat table to see the category.

Now, the problem is that the category table is:

| id | name | linkcount


What I want to do is be able to do queries linking this all together; so that I can show a user how many articles are in the categories they want to view, but a parent should include its childrens counts.

At the moment the only way I can think of doing this without recursive queries is to get all the category data into PHP and do it that way, very ugly.

Any ideas?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On