SQL strins querry problem
#1

Okay ive got an issue with the querry, simply not working. No errors.

pawn Код:
new query[1024], Float:pos[3],string[512];
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    strins(string,"UPDATE `players` SET `Admin`=%d, `VIP`=%d, `Reputation`=%d, `posX`=%f, `posY`=%f, `posZ`=%f, `Score`=%d, `Deaths`=%d, `Kills`=%d, `Banned`=%d, `Kicks`=%d",strlen(string));
    strins(string,"EquipmentM4`=%d,`EquipmentAK47`=%d,`EquipmentDeagle`=%d,`EquipmentKnife`=%d,`Equipment9MM`=%d,`EquipmentShotgun`=%d,`EquipmentUzi`=%d WHERE `ID`=%d",strlen(string));
    format(query, sizeof(query), string,pInfo[playerid][Admin], pInfo[playerid][VIP], pInfo[playerid][Reputation], pos[0], pos[1], pos[2], pInfo[playerid][Score],pInfo[playerid][Deaths],pInfo[playerid][Kills],pInfo[playerid][Banned],pInfo[playerid][Kicks],pInfo[playerid][EquipmentM4],pInfo[playerid][EquipmentAK47],\
    pInfo[playerid][EquipmentDeagle],pInfo[playerid][EquipmentKnife],pInfo[playerid][Equipment9MM],pInfo[playerid][EquipmentShotgun],pInfo[playerid][EquipmentUzi],pInfo[playerid][ID]);
    mysql_tquery(mysql, query, "", "");
Reply
#2

You should use format function
Reply
#3

Could you give me an example of what you think?

And a side note, I cant use format, its too long. Im getting errors when using format.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)