05.11.2011, 17:27
Код:
format(query,sizeof(query),"UPDATE playerdata SET kills=%d WHERE user = '%s'", Kills[playerid],pNome(playerid));
format(query,sizeof(query),"UPDATE playerdata SET kills=%d WHERE user = '%s'", Kills[playerid],pNome(playerid));
Mysql_Update(playerid) { new query[500]; format(query,sizeof(query),"SELECT * FROM playerdata WHERE user = '%s'",pNome(playerid)); mysql_query(query); format(query,sizeof(query),"UPDATE playerdata SET kills=%d WHERE user = '%s'", Kills[playerid],pNome(playerid)); if(mysql_query(query)) { printf("gravou"); } else { printf("problema ao gravar"); printf("%s",query); } mysql_store_result(); return 1; }
UPDATE playerdata SET kills = '%d' WHERE user = '%s'
format(query,sizeof(query),"SELECT * FROM playerdata WHERE user = '%s'",pNome(playerid));
mysql_query(query);
Mysql_Update(playerid)
{
new query[500];
format(query,sizeof(query),"SELECT * FROM playerdata WHERE user = '%s'",pNome(playerid));
mysql_query(query);
mysql_store_result();
format(query,sizeof(query),"UPDATE playerdata SET kills = '%d' WHERE user = '%s'", Kills[playerid],pNome(playerid));
if(mysql_query(query))
{
printf("gravou");
}
else
{
printf("problema ao gravar");
printf("%s",query);
}
mysql_free_result();
return 1;
}
if(mysql_query(query))