Page 1 of 1

Clan list

Posted: Thu Feb 06, 2014 2:21 pm
by njfrlng
I just bought the clan list module, I get this error when i click on the clan list after I install it.

http://prntscr.com/2q0lxw

Re: Clan list

Posted: Thu Feb 06, 2014 2:52 pm
by a_bertrand
It is lacking a column called memb_count. Try to check in the module directory if there is some SQL file adding this column, if yes run the script manually with PhpMyAdmin, if not, I assume memb_count is an int... edit the table and add that column. However this module is bugy.

Re: Clan list

Posted: Thu Feb 06, 2014 3:07 pm
by njfrlng
Adding the memb_count column and making it an int worked.

shows as zero though.

I dont see where in the databases clan member info is stored.

Re: Clan list

Posted: Tue Aug 26, 2014 12:02 pm
by illusions
i think this is a mod i made i will look into any issues

Re: Clan list

Posted: Mon Sep 08, 2014 1:34 pm
by illusions
FIX for the incorrect memb_count.

open up

modules/clans_admin_new_members/in_clans.php

look for near top of page

Code: Select all

 $db->Execute("update clans_roles set role_id = 1 where user_id = ? and clan_id = ?", $_GET["accept"], $memberOf);
underneath add..

Code: Select all

$db->Execute("update clans set memb_count=memb_count+1 where id = ?", $memberOf);
Sorry for delay in fixing this issue it was something i had forgotten about..

you may need to go to phpmyadmin under clans and add the clan member amounts so the update will correct itself

WHEN A USER LEAVES A CLAN

ALSO whilst im here if you have the modules/clans_leave/

then open up the in_clans.php
and under line 4 add

Code: Select all

$db->Execute("update clans set memb_count=memb_count-1 where id = ?", $memberOf);
this will deduct the count when a member leaves

WHEN CREATING YOUR FIRST CLAN

open up modules/clans/content.php

and on line 27 replace that with this

Code: Select all

 $db->Execute("insert into clans(name,description,memb_count) values(?,?,'1')", $_POST["name"], $_POST["desc"]);
this will make sure that the count starts immediatley once a new Clan is created

Re: Clan list

Posted: Fri Oct 10, 2014 7:55 pm
by Tangled
Quoting: Sorry for delay in fixing this issue it was something i had forgotten about..
you may need to go to phpmyadmin under clans and add the clan member amounts so the update will correct itself


So do I need to add a column in the database for the count. If so what's the correct way to add. I'm still getting errors and there's no count column in phpmyadmin for a count in clans

Re: Clan list

Posted: Fri Oct 10, 2014 8:25 pm
by Sim
It looks like your column should be called "memb_count" in table "clans".

Make the column "INT". I would say make it 6 in length, default value "0"

Re: Clan list

Posted: Mon Oct 13, 2014 7:33 pm
by Tangled
awesome thank you that worked ! :D