Guild Ranks/Titles - How do I exclude those called "Alts"?

Here you can find plenty of help with your general coding needs and projects
If it is about a specific program, use the corresponding forum
DO NOT ask basic questions such as "How do I print a variable", use Google for that

Guild Ranks/Titles - How do I exclude those called "Alts"?

Postby crucius » Mon Jan 08, 2007 7:32 pm

My guild leader does not wish to have any alts show on the roster [or just have them hidden].

In-game, we have ranks for raiding:

Raider
Soldier
Ally
Alt
Retired

I tested the AltMonitor addon, but that is more than I am looking for. Perhaps there is some simple coding that will filter the "Title" column to exclude alts from the inital roster?

TIA
crucius
WR.net Apprentice
WR.net Apprentice
 
Posts: 4
Joined: Mon Jan 08, 2007 7:12 pm

Re: Guild Ranks/Titles - How do I exclude those called "Alts

Postby crucius » Wed Jan 10, 2007 2:46 pm

ok, i'm not a php coder, so this is a feeble attempt to get a result!

Could someone look over this code and find where my syntax is wrong? This is the specific feedback I got from the server:

1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 2, 3, 5, 6, 7, 9 ORDER BY `members`.`guild_rank` ASC, `members`


The original code is from memberslist.php, line 206.

Code: Select all
// All those people asking about guild searching, here's a spot!  and here's the simple alteration to stop guild filtering in this particular place
   "LEFT JOIN `".ROSTER_PLAYERSTABLE."` AS players ON `members`.`member_id` = `players`.`member_id` AND `members`.`guild_id` = '$guildId' ".
   "ORDER BY ";


My goal was to have guild ranks 1, 2, 3, 5, 6, 7, and 9 show. Those are the numbers that correspond to "Guild Leader, Officer, Class Leader, Raider, Soldier, Ally, Retired". Here is the code that I modified, and has the incorrect syntax.

Code: Select all
// All those people asking about guild searching, here's a spot!  and here's the simple alteration to stop guild filtering in this particular place
   "LEFT JOIN `".ROSTER_PLAYERSTABLE."` AS players ON `members`.`member_id` = `players`.`member_id` AND `members`.`guild_id` = '$guildId' WHERE `guild_rank` = 1, 2, 3, 5, 6, 7, 9 ".
   "ORDER BY ";


I've made a lot of effort, so I would appreciate any help anyone can offer!

TIA
crucius
WR.net Apprentice
WR.net Apprentice
 
Posts: 4
Joined: Mon Jan 08, 2007 7:12 pm

Re: Guild Ranks/Titles - How do I exclude those called "Alts

Postby crucius » Wed Jan 10, 2007 3:20 pm

Code: Select all
// All those people asking about guild searching, here's a spot!  and here's the simple alteration to stop guild filtering in this particular place
   "LEFT JOIN `".ROSTER_PLAYERSTABLE."` AS players ON `members`.`member_id` = `players`.`member_id` AND `members`.`guild_id` = '$guildId' WHERE `guild_rank` !=3 AND `guild_rank` !=7 ".
   "ORDER BY ";


I finally figured it out!

These are the Rank Titles in my guild:

0. Guild Leader
1. Officer
2. Class Leader
3. Leadership Alt
4. Raider
5. Soldier
6. Ally
7. Alt
8. Retired.

To exclude alts, both "Leadership Alts" and member "Alts", I had to exclude with "!=" [not equal to] rank 3 and rank 7.

Hope this helps someone else...I'm not a coder...i'm an artist.

>.>

<.<

Thanks for the help guys... :twisted:
crucius
WR.net Apprentice
WR.net Apprentice
 
Posts: 4
Joined: Mon Jan 08, 2007 7:12 pm


Return to General Code Help

Who is online

Users browsing this forum: No registered users and 0 guests

cron