Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 11th, 2004, 02:25 PM
Authorized User
 
Join Date: Mar 2004
Location: , , .
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to gmoney060 Send a message via MSN to gmoney060
Default GroupIDs and Permissions

Hello.
I am wanting to make a Forums board and before I start I am thinking about some things that I want to be able to do, but dont have a clue how to do them. I need to have diffrent groups and the user has to change groups automatically accordenly. For example this is what i was thinking about for my database table design:

[u]GroupID(PK)</u> | [u]GroupName</u> | [u]MinPosts</u> | [u]SpecialRank</u> | [u]Stars</u>
       1 Adminstration 0 Yes 5
       2 Adminstrator 0 Yes 5
       3 Newbie 0 No 0
       4 Adv. Member 50 No 2

And then in the Users table it would have a place to specify what Group they are in. The only problem is, when they have over 40posts they change groups. How would you have Access change that number automatically? Or is there a better way, or easier.... I am not THAT good at programming yet, so a example would be awsome!

Reply With Quote
  #2 (permalink)  
Old August 11th, 2004, 08:30 PM
Authorized User
 
Join Date: Aug 2004
Location: Chicago, IL, USA.
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

There are two ways you could go with this.

1) When the person posts a new post, check the number of posts they've posted and, if needed, adjust their rank. So if a user just posted their 50th post, your code would detect that and change their status in the database.

2) The more common method is to write a function that calculates the person's rank each time it's requested. So if I just requested a post or profile by John Doe, a function like calcRank would be called and respond with John Doe's proper rank.

An even more efficient method would be to write a SQL query that automatically joined the ranks table to the members table every time you needed both a person's name and rank. But that would be a fairly advanced SQL query and I wouldn't know exactly how to do that for your specific case.

Hope this information was helpful in some way.

Chris

Reply With Quote
  #3 (permalink)  
Old August 11th, 2004, 09:49 PM
Authorized User
 
Join Date: Mar 2004
Location: , , .
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to gmoney060 Send a message via MSN to gmoney060
Default

yep thanks a lot!

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 Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IIS Permissions ASPNewbie2 ASP.NET 2.0 Basics 0 December 13th, 2006 09:06 AM
database permissions marmer All Other Wrox Books 1 November 15th, 2004 09:46 AM
Permissions w/o server Snib Pro PHP 12 August 11th, 2004 04:54 PM
Permissions rwalker Crystal Reports 1 June 23rd, 2004 04:33 PM
File Permissions rwalker ASP.NET 1.0 and 1.1 Basics 5 April 20th, 2004 12:29 PM



All times are GMT -4. The time now is 10:14 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.