Helper !
- Joined
- Jun 23, 2010
- Messages
- 785
- Reaction score
- 228
$TotalAccounts = odbc_num_rows(odbc_exec($conn2,"SELECT UID from [Login]"));
or
$r = odbc_fetch_array(odbc_exec($conn,"SELECT Currency FROM [Statistics]"));
$on3 = $r['Currency'];
Why do you even release this kind of simple php?
And why don't you use mssql_num_rows or odbc_num_rows instead of executing the whole query? Heavy load on the server every time...
like
You also forgot the ORDER BY from Statistics.
If you want to release this "just to release something", better to not release anything...
i think you have to Encourage and support beginners instead attack themWhy do you even release this kind of simple php?
And why don't you use mssql_num_rows or odbc_num_rows instead of executing the whole query? Heavy load on the server every time...
like
You also forgot the ORDER BY from Statistics.
If you want to release this "just to release something", better to not release anything...
Thanks buddy keep going up (Y)i know the php code is sucks
but im trying to learn even if this useless
some admins maybe need this some not ..
Shut up and say thanksWhy do you even release this kind of simple php?
And why don't you use mssql_num_rows or odbc_num_rows instead of executing the whole query? Heavy load on the server every time...
like
You also forgot the ORDER BY from Statistics.
If you want to release this "just to release something", better to not release anything...
Go teach them bossi think you have to Encourage and support beginners instead attack them
i think you forgot the php things
no more mssql connection in PHP its only in the old versions
there is other sql connection called SQLSRV at this time
good job xhethx
void CPlayer::LogPlayerStatistic(){
int nSection[11][6];
ZeroMemory(&nSection, sizeof(nSection));
CPlayer *p;
LINKPLAYER_BEGIN(p)
if (p->m_nLevel <= 100)
{
int nNum = (p->m_nLevel - 1) / 10;
++nSection[nNum][p->m_nClass];
++nSection[nNum][STATLOG_TOTAL];
if (p->IsGState(CGS_FISH))
++nSection[nNum][STATLOG_FISH];
if (p->IsGState(CGS_ONSTALL))
++nSection[nNum][STATLOG_STALL];
}
LINKPLAYER_END;
for (int i = 0; i < 10; i++)
{
LOG_NORMAL("(Level Range : ##%02d ~ %02d) : (Kninght : %d) (Mage : %d) (Archer : %d) (Total : %d)", 10 * i + 1, 10 * i + 10, nSection[i][STATLOG_KNIGHT], nSection[i][STATLOG_MAGE], nSection[i][STATLOG_ARCHER], nSection[i][STATLOG_TOTAL]);
LOG_NORMAL("(Level Range : @@%02d ~ %02d) : (State : (Fish : %d) (Stall : %d))", 10 * i + 1, 10 * i + 10, nSection[i][STATLOG_FISH], nSection[i][STATLOG_STALL]);
nSection[10][STATLOG_KNIGHT] += nSection[i][STATLOG_KNIGHT];
nSection[10][STATLOG_MAGE] += nSection[i][STATLOG_MAGE];
nSection[10][STATLOG_ARCHER] += nSection[i][STATLOG_ARCHER];
nSection[10][STATLOG_TOTAL] += nSection[i][STATLOG_TOTAL];
nSection[10][STATLOG_FISH] += nSection[i][STATLOG_FISH];
nSection[10][STATLOG_STALL] += nSection[i][STATLOG_STALL];
}
LOG_NORMAL("##Total Player Statistic : (Kninght : %d) (Mage : %d) (Archer : %d) (Total : %d)", nSection[10][STATLOG_KNIGHT], nSection[10][STATLOG_MAGE], nSection[10][STATLOG_ARCHER], nSection[10][STATLOG_TOTAL]);
LOG_NORMAL("@@Total Player Statistic State : (Fish : %d) (Stall : %d)", nSection[10][STATLOG_FISH], nSection[10][STATLOG_STALL]);
LOG_NORMAL("$$Currency Total : %d", s_nCurrency);
CDBSocket::Write(S2D_STATISTICS, "ddddddd", nSection[10][STATLOG_KNIGHT], nSection[10][STATLOG_MAGE], nSection[10][STATLOG_ARCHER], nSection[10][STATLOG_TOTAL], nSection[10][STATLOG_FISH], nSection[10][STATLOG_STALL], CPlayer::s_nCurrency);
}
This isnt for a website or? But thanks for your answer
i know the php code is sucks
but im trying to learn even if this useless
some admins maybe need this some not ..
You must be registered to see links
Download :
You must be registered to see links
mirror :You must be registered to see links
Special thanks to Beshoy aka TheDragon for help
---- update
like what General said .. maybe the old code is heavy load on the server "maybe not"
so i use his code
You must be registered to see links
thanks to General