Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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!

 
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

 
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!





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.