plodos Posted August 8, 2008 Share Posted August 8, 2008 EACH MEMBER HAS GRADE like that sql table CREATE TABLE `person` ( .............................. `grade` INT NOT NULL, ............................. ) php/query for list the members without GRADE system <?php include('dbconfig.php'); $data = mysql_query("select p.* from join_person_committee j, person p where j.committee_id=1 AND j.person_id = p.person_id"); //sample query without GRADE while($info=mysql_fetch_array($data)) { echo" {$info['fname']} {$info['lname']}, {$info['country']} <br>"; echo" {$info['uni']}<br>"; echo" {$info['uni_dept']}<br>"; } ?> grade = 0 normal member grade = 0-50 silver member grade = 50-100 gold member If user has 100 Grade, output will be like that echo" {$info['fname']} {$info['lname']}, {$info['country']} ([b]GOLD MEMBER[/b])<br>"; echo" {$info['uni']}<br>"; echo" {$info['uni_dept']}<br>"; If user has 50 Grade, output will be like that echo" {$info['fname']} {$info['lname']}, {$info['country']} ([b]SILVER MEMBER[/b])<br>"; echo" {$info['uni']}<br>"; echo" {$info['uni_dept']}<br>"; If user has 0 Grade, output will be like that echo" {$info['fname']} {$info['lname']}, {$info['country']} ([b]NORMAL MEMBER[/b])<br>"; echo" {$info['uni']}<br>"; echo" {$info['uni_dept']}<br>"; Thats not possible to write NORMAL/SILVER/GOLD MEMBERs one by one for each user..There must be a auto-system.. You understood what I mean... How can I write these code? What must I do? Who can give me the sample/example code? Thanks for helping me.... Link to comment https://forums.phpfreaks.com/topic/118849-give-me-an-idea-please-i-want-to-make-member-system-with-degrees/ Share on other sites More sharing options...
waynew Posted August 8, 2008 Share Posted August 8, 2008 Just do the calculations when you're printing it out. IF score > 80 echo Gold member. Or you could create another column and insert their level and/or update their level. Link to comment https://forums.phpfreaks.com/topic/118849-give-me-an-idea-please-i-want-to-make-member-system-with-degrees/#findComment-612032 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.