Hi, firstly sorry for the bad english.
I want to draw the name of the team according to the ID address given in the plugin below. How can I do this?
PHP Code:
public stats_log_sql_team( team[] )
{
new team_id = -1
new Handle:Query // The result handle, holds the query.
new error[512]
new num_rows
Query = SQL_PrepareQuery(SqlConnection, "SELECT * FROM `%s` WHERE `team_name` = ^"%s^";", AMXMD_SQL_TEAM, team)
// run the query
if(!SQL_Execute(Query))
{
// if there were any problems
SQL_QueryError(Query, error, 511)
log_amx("[AMXX] SQL Connection Failed: %s", error)
}
else
{
num_rows = SQL_NumResults ( Query )
// If team wasn't in the team table, then add it and get team_id
if( num_rows == 0 )
{
Query = SQL_PrepareQuery(SqlConnection, "INSERT INTO `%s` ( `team_name` ) VALUES ( ^"%s^" );", AMXMD_SQL_TEAM, team)
// run the query
if(!SQL_Execute(Query))
{
// if there were any problems
SQL_QueryError(Query, error, 511)
log_amx("[AMXX] SQL Connection Failed: %s", error)
}
else
{
team_id = SQL_GetInsertId ( Query )
}
}
else // or just get the team_id
{
team_id = SQL_ReadResult(Query, 0)
}
SQL_FreeHandle(Query)
}
return team_id
}
I record MYSQL according to the team's name with the code above.
Take the name of the team according to the ID address I want to do. How can I do this?
Command works like this;
amx_match <CT's clan tag> <T's clan tag> <mr raund> <Config file> [recdemo|rechltv|recboth]
sample;
amx_match "AClan" "BClan" "mr10" "match" "recdemo"
I want it to work like this
amx_match <CT's clan ID> <T's clan ID> <raund> <Config file> [recdemo|rechltv|recboth]
sample;
amx_match "10" "11" "mr10" "match" "recdemo"
How can I edit ?