- 0
Problema Query Mysql
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Stark.sys
Problemă întâlnită (descriere): Eroare scriere query in baza de date.
Ero(area / rile) / warning-(ul / urile): (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 'WHERE `ID`='4'' at line 1
Liniile de cod / sursa / script-ul: [pawn]CMD:setgang(playerid, params[])
{
if(GangData[playerid][gAdmi] >= 1 || IsPlayerAdmin(playerid))
{
new id, gid, rs[32];
if(sscanf(params, "uds[32]", id, gid, rs)) return SendClientMessage(playerid, -1, "Usage: /setgang ");
CheckFactionUpdate(id);
new tName[MAX_PLAYER_NAME];GetPlayerName(id, tName, 32);
new string[260]; GangData[id][gGang] = gid, GangData[id][gLead] = 1, GangData[id][gRank] = 6;
Gangs[gid][iMemb] += 1; SendClientMessage(id, -1, "{0097FF}|_____________Promoted_____________|");
mysql_format(sql, string, sizeof(string), "UPDATE `gangs` SET `Leader`='%s',`Member`='%d', WHERE `ID`='%d'", tName, Gangs[gid][iMemb], gid);
mysql_tquery(sql, string, "OnGangsCheck", "i", gid);
SendClientMessage(id, -1, " {0097FF}Felicitari ai fost promovat. ");
new adminact[1500], res[1280], date[48], a,l,z,o,m,s; gettime(o,m,s), getdate(a,l,z);
format(res, sizeof(res), "%s a fost promovat ca lider al mafiei %d cu rank %d. Motiv: %s", tName, gid, 1, 6, rs);
format(date, sizeof(date), "%d/%d/%d - %d:%d:%d", a,l,z,o,m,s);
mysql_format(sql, adminact, sizeof(adminact), "INSERT INTO `admin_action`(`ID`, `Admin-Name`, `IP`, `Action`, `Date`) VALUES (1,'%e','%s','%s','%s');", Name[playerid], IP[playerid], res, date);
mysql_tquery(sql, adminact, "", "");
}
return 1;
}[/pawn]
Imagini / Video (optional): http://i39.servimg.com/u/f39/17/39/93/85/snapsh10.png
Aţi încercat să rezolvaţi singur?: Da, dar nu stiu dece nu mai merge :|
"Mulţi programatori buni fac programare nu pentru că se aşteaptă să câştige bani sau să fie lăudaţi de public, ci pentru că e amuzant să programezi." - Linus Torvalds
1 answer to this question
Recommended Posts