strcat(Query,"INSERT INTO `banidos`(ban_motivo,Ban_Dia,Ban_Mes,Ban_Ano,Desban_Dia,Desban_Mes,Desban_Ano,Ban_Hora,Ban_Minuto,Ban_Segundo,Desban_Hora,Desban_Minuto,Desban_Segundo,user_admin)");
strcat(Query," VALUES ('%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s')");
mysql_format(MySQL, Query,sizeof(Query),Query, motivo,Dia, Mes, Ano, DesbanDia, DesbanMes, DesbanAno, Hora, Minuto, Segundo, DesbanHora, DesbanMinuto, DesbanSegundo, Admin);
mysql_query(MySQL,Query,false);
[20:10:55] [ERROR] CMySQLQuery::Execute - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO `banidos`(ban_motivo,Ban_Dia,Ban_Mes,Ban_Ano,Desban_Dia,Desban_Mes,D' at line 1 [20:13:44] [ERROR] CMySQLQuery::Execute - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO `banidos`(ban_motivo,Ban_Dia,Ban_Mes,Ban_Ano,Desban_Dia,Desban_Mes,D' at line 1
stock MySQL_BanIP(playerid, Admin[], motivo[], DesbanDia = 0, DesbanMes = 0, DesbanAno = 0, DesbanHora = 0, DesbanMinuto = 0, DesbanSegundo = 0)
{
if(ConfirmarConta(PlayerName(playerid)))
{
new Query[800], Rows, Fields; GetPlayerIp(playerid, IpPlayer, sizeof(IpPlayer)); getdate(Ano, Mes, Dia); gettime(Hora, Minuto, Segundo);
mysql_format(MySQL,Query, sizeof(Query), "SELECT * FROM `banidos` WHERE `ip_ban`='%s'", IpPlayer);
mysql_query(MySQL,Query);
cache_get_data(Rows, Fields);
if(Rows)
{
strcat(Query,"UPDATE `banidos` SET `ban_motivo`='%s', `Ban_Dia`='%d', `Ban_Mes`='%d', `Ban_Ano`='%d', `Desban_Dia`='%d', `Desban_Mes`='%d', `Desban_Ano`='%d'");
strcat(Query,", `Ban_Hora`='%d', `Ban_Minuto`='%d', `Ban_Segundo`='%d', `Desban_Hora`='%d', `Desban_Minuto`='%d', `Desban_Segundo`='%d', `user_admin`='%s'");
cache_get_field_content(0, "Desban_Dia", string); DesbanDia = DesbanDia+strval(string);
cache_get_field_content(0, "Desban_Hora", string); DesbanHora = DesbanHora+strval(string);
cache_get_field_content(0, "Desban_Mes", string); DesbanMes = DesbanMes+strval(string);
cache_get_field_content(0, "Desban_Minuto", string); DesbanMinuto = DesbanMinuto+strval(string);
cache_get_field_content(0, "Desban_Ano", string); DesbanAno = DesbanAno+strval(string);
cache_get_field_content(0, "Desban_Segundo", string); DesbanSegundo = DesbanSegundo+strval(string);
mysql_format(MySQL, Query,sizeof(Query),Query, strlen(motivo),Dia, Mes, Ano, DesbanDia, DesbanMes, DesbanAno, Hora, Minuto, Segundo, DesbanHora, DesbanMinuto, DesbanSegundo, Admin);
mysql_query(MySQL,Query,false);
SetTimerEx("kickplayer", 100, false, "i", playerid);
return 1;
}
else if(!Rows)
{
strcat(Query,"INSERT INTO `banidos`(ban_motivo,Ban_Dia,Ban_Mes,Ban_Ano,Desban_Dia,Desban_Mes,Desban_Ano,Ban_Hora,Ban_Minuto,Ban_Segundo,Desban_Hora,Desban_Minuto,Desban_Segundo,user_admin)");
strcat(Query," VALUES ('%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s')");
mysql_format(MySQL, Query,sizeof(Query),Query, motivo,Dia, Mes, Ano, DesbanDia, DesbanMes, DesbanAno, Hora, Minuto, Segundo, DesbanHora, DesbanMinuto, DesbanSegundo, Admin);
mysql_query(MySQL,Query,false);
SetTimerEx("kickplayer", 100, false, "i", playerid);
return 1;
}
}
return 1;
}
"INSERT INTO `banidos`(ban_motivo,Ban_Dia,Ban_Mes,Ban_Ano,Desban_Dia,Desban_Mes,Desban_Ano,Ban_Hora,Ban_Minuto,Ban_Segundo,Desban_Hora,Desban_Minuto,Desban_Segundo,user_admin) VALUES ('%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s');"
PHP код:
|
strcat(Query,"INSERT INTO `banidos`(ip_ban)");
strcat(Query," VALUES ('%s')");
mysql_format(MySQL, Query,sizeof(Query),Query, IpPlayer);
mysql_query(MySQL,Query,false);
"INSERT INTO `banidos` (ban_motivo,Ban_Dia,Ban_Mes,Ban_Ano,Desban_Dia,Desban_Mes,Desban_Ano,Ban_Hora,Ban_Minuto,Ban_Segundo,Desban_Hora,Desban_Minuto,Desban_Segundo,user_admin) VALUES ('%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s');"
UPDATE tabela SET coluna=10 WHERE 1
INSERT INTO contas (name,password) VALUES ('Joaozinho',sha1('10000'));
Agora vai '-'
A tabela estava colada com as colunas PHP код:
PHP код:
PHP код:
|
strcat(Query,"INSERT INTO `banidos` (ip_ban,ban_motivo,Ban_Dia,Ban_Mes,Ban_Ano,Desban_Dia,Desban_Mes,Desban_Ano,Ban_Hora,Ban_Minuto,Ban_Segundo,Desban_Hora,Desban_Minuto,Desban_Segundo,user_admin) VALUES ('%s','%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s');");
mysql_format(MySQL, Query,sizeof(Query),Query, IpPlayer, motivo,Dia, Mes, Ano, DesbanDia, DesbanMes, DesbanAno, Hora, Minuto, Segundo, DesbanHora, DesbanMinuto, DesbanSegundo, Admin);
mysql_query(MySQL,Query,false);
strcat(Query,"INSERT INTO `banidos` (ip_ban,ban_motivo,Ban_Dia,Ban_Mes,Ban_Ano,Desban_Dia,Desban_Mes,Desban_Ano,Ban_Hora,Ban_Minuto,Ban_Segundo,Desban_Hora,Desban_Minuto,Desban_Segundo,user_admin)");
strcat(Query," VALUES ('%s', '%s', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s');");
mysql_format(MySQL, Query,sizeof(Query),Query, IpPlayer, motivo,Dia, Mes, Ano, DesbanDia, DesbanMes, DesbanAno, Hora, Minuto, Segundo, DesbanHora, DesbanMinuto, DesbanSegundo, Admin);
mysql_query(MySQL,Query,false);
[21:07:26] [ERROR] CMySQLQuery::Execute - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO `banidos`(ban_motivo,Ban_Dia,Ban_Mes,Ban_Ano,Desban_Dia,Desban_Mes,D' at line 1
[21:08:35] [ERROR] CMySQLQuery::Execute - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO `banidos`(ban_motivo,Ban_Dia,Ban_Mes,Ban_Ano,Desban_Dia,Desban_Mes,D' at line 1
[21:12:45] [ERROR] CMySQLQuery::Execute - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO `banidos`(ip_ban,ban_motivo,Ban_Dia,Ban_Mes,Ban_Ano,Desban_Dia,Desba' at line 1
[21:13:53] [ERROR] CMySQLQuery::Execute - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO `banidos`(ip_ban) VALUES ('192.168.0.15')' at line 1
[23:13:11] [ERROR] CMySQLQuery::Execute - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO `banidos`(ip_ban,ban_motivo,Ban_Dia,Ban_Mes,Ban_Ano,Desban_Dia,Desba' at line 1
[23:14:50] [ERROR] CMySQLQuery::Execute - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO `banidos` (ban_motivo,Ban_Dia,Ban_Mes,Ban_Ano,Desban_Dia,Desban_Mes,' at line 1