Hey, how to get list of players and other column from mysql ?
I want to get a list like that:
Name----SomeNum
Name2--SomeNum2
...
Then show it on Motd, like top
PS. Also how to get the numrow in sql table ? like in php
PHP Code:
mysql_num_rows($result);
Is this the same ?
http://www.amxmodx.org/funcwiki.php?go=func&id=1107
Whats wrong with that ? :
PHP Code:
public PrintCountMotd(id)
{
new Motd[1256], szTemp[512];
new iLen[555];
new rowNum = SQL_AffectedRows ( g_SqlTuple )
new szName[33], iResult[33]
for(new i = 0; i < rowNum; i++)
{
get_user_name(i, szName, 32)
format(szTemp,charsmax(szTemp),"SELECT count FROM `count` WHERE name='%s'", szName)
iResult = SQL_ReadResult(Query, 0)
iLen += formatex(Motd[iLen], charsmax(Motd) - iLen, "%s - %d^n", szName, iResult)
}
show_motd(id, iLen, "Admin count")
}