Mysql saving
#1

i made a system for saving and loading,it loads right but when i save it saves wrong ,everything gets messed,like num stays 3 while it has been set to 0,here is the code
pawn Код:
forward SaveIds();
public SaveIds()
{
    for(new id = 0; id < MAX_IDS; id++)
    {
            new query[128];
            mysql_format(mysqlquery, query, sizeof(query), "UPDATE `ids` SET `IDSet`=%d, `IDDone`=%d, `IDPosX`=%f, `IDPosY`=%f, `IDPosZ`=%f,`IDPosA`=%f, `IDNum`=%d, `IDAmount`=%d, `IDType`=%d, `IDTypename`='%s', `IDMoveX`=%f, `IDMoveY`=%f, `IDMoveZ`=%f  WHERE `ID`=%d",
            IdInfo[id][idset], IdInfo[id][iddone], IdInfo[id][idposx], IdInfo[id][idposy], IdInfo[id][idposz],
            IdInfo[id][idposa], IdInfo[id][idnum], IdInfo[id][idamount], IdInfo[id][idtype], IdInfo[id][idtypename]
             ,IdInfo[id][idmovex], IdInfo[id][idmovey], IdInfo[id][idmovez], id);
            printf("\n %s", query);
            mysql_tquery(mysqlquery, query);
            printf("Saved ID %d", id);
    }
    return 1;
}
NOTE:it prints the query right but saves wrong in database
Reply


Messages In This Thread
Mysql saving - by iBots - 15.04.2015, 23:36
Re: Mysql saving - by iBots - 16.04.2015, 05:03
Re: Mysql saving - by iBots - 16.04.2015, 08:40
Re: Mysql saving - by Darrenr - 16.04.2015, 08:43
Re: Mysql saving - by MEW273 - 16.04.2015, 08:55
Re: Mysql saving - by iiNzTicTx - 16.04.2015, 08:59

Forum Jump:


Users browsing this thread: 3 Guest(s)