Hi ! Can somebody help pe to transform this Clan Top from SQL into MySQL or sql clan top for web site php X_X
Код:
ShowTopClan( playerid, stats[ ], what[ ], limit = MAX_TOP_LIMIT )
{
#pragma unused what
//--------------------------------------------------------------------------
new Speed = GetTickCount(), DialString[3_000], String[2][256], Query[2][256],
DBResult:Result1, cColor[12] = "{FFFFFF}", oColor[12] = "{AEFF00}";
//--------------------------------------------------------------------------
Database = db_open( "LuxAdmin/Clanuri.db" ); //Open DB
//--------------------------------------------------------------------------
format( Query[ 0 ], 256, "SELECT `clanname` FROM `clans` ORDER BY (`%s` * 1) DESC limit %d", stats, limit);
Result1 = db_query( Database, Query[ 0 ] );
//--------------------------------------------------------------------------
format( DialString, sizeof DialString, "%s{cfcfcf}Our Top 10 Clans are here \n",oColor);
for( new Qr; Qr < db_num_rows( Result1 ); Qr ++ )
{
db_get_field( Result1, 0, String[ 0 ], 256 );
format( Query[ 1 ], 256, "SELECT `%s` FROM `clans` WHERE `clanname` = '%s'", stats, String[ 0 ] );
new DBResult:Result2 = db_query( Database, Query[ 1 ] );
db_get_field( Result2, 0, String[ 1 ], 256 );
format( DialString, sizeof DialString, "%s\n{ff0000}%d.{cfcfcf} %s{cfcfcf}: {00ff00}%s{00ff00}%s", DialString, Qr + 1, String[0], cColor, FormatNumber(strval(String[1])), GetTotalMembers(String[0]));
db_next_row( Result1 );
db_free_result( Result2 );
}
db_free_result( Result1 );
format( DialString, sizeof DialString, "%s\n\n{cfcfcf}Visit {ff0000}www.ass-samp.tk{cfcfcf} for more", DialString, GetTickCount( ) - Speed );
ShowPlayerDialog( playerid, Nothing, DIALOG_STYLE_MSGBOX, "{bdbdbd}Top 10: {ff0000}Clans", DialString, "Ok", "" );
return ( 1 );
}