Convoy Trucking
Server related => Suggestions => Locked & Closed Suggestions => Topic started by: Dobby on August 11, 2013, 04:09
This isn't advertising my club. I was doing it to suggest an addition.
From:
(http://i.imgur.com/I6hVFsA.png)
To:
Club Funds: $1,333,337
Club Members: 1337
Or something like that :)
Like it? Good. :megusta:
Dont like it? :Sad_Okay:
I woudlnt put it under club funds, since that is under "base and funds", id put it under description or founder :P
Quote from: TheSandman on August 11, 2013, 04:12
I woudlnt put it under club funds, since that is under "base and funds", id put it under description or founder :P
Ok :P but cant "base and funds" be changed to "Club info" or "Club stats"?
in the SQL query for "clubs" when you get the info, add a field called "(SELECT COUNT(*) FROM club_members WHERE club_id = clubs.id AND position > 0) as member_count" in the SELECT statement. Get it with mysql_fetch...("member_count")
So atm you have a query like
SELECT *, club_base.* FROM clubs LEFT JOIN club_base ON clubs.id = club_base.club_id WHERE clubs.id = %n
Change it to (don't copy this directly, just add the new field where I put it;
SELECT *, club_base.*, (SELECT COUNT(*) FROM club_members WHERE club_id = clubs.id AND position > 0) as member_count FROM clubs LEFT JOIN club_base ON clubs.id = club_base.club_id WHERE club_id = %n
Added.
Edit: Due to some issues the code will be reviewed for next update.