Trying to make this set Arrested = 1 for all ID's in table.
#1

This only sets the arrested = 1 for the last table it dealt with.

pawn Код:
format(query, sizeof(query), "UPDATE `arecords` SET arrested = 1 WHERE id = %d", PlayerArrests[giveplayerid][ar_id]);
    mysql_query(query);
pawn Код:
format(string, sizeof(string), "SELECT * FROM `arecords` WHERE `PSQLID`= %d AND `Arrested`=0", PlayerSQLID[giveplayerid]);
    mysql_query(string);
    mysql_store_result();
    new r_msg[500];

    new totaltime = 0;
    //while(mysql_fetch_row(r_msg, "|"))
    while(mysql_fetch_row(r_msg))
    {
        sscanf(r_msg, "p<|>e<iiiis[24]ii>", PlayerArrests[giveplayerid]);
        totaltime += PlayerArrests[giveplayerid][ar_ti]; //same here, you'll have to change it to the fieldname that says how long he should be arrested for THAT ONE crim
    }
Where it retrieves.

Could anyone assist me?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)