SA-MP Forums Archive
SQLite question - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SQLite question (/showthread.php?tid=584542)



SQLite question - DarkLored - 05.08.2015

Hello, I am currently creating a tax system for my gamemode and I am having trouble figuring out if I can use a 1 dimensional variable for the enumeration to update the tax system.


Here is my code and an example of what I mean

pawn Код:
enum TaxData
{
    TaxAmount,
    TaxGathered,
    Police,
    Fire,
    Corrections,
    Gov,
    Court
};
new tInfo[TaxData];
pawn Код:
tInfo[TaxGathered] = amount/TAX_AMOUNT;
        format(Query, sizeof(Query), "UPDATE taxinfo SET taxgathered = %d", tInfo[TaxGathered]);
Is it possible to update the Query without having an ID to begin with? thanks in advance.


Re: SQLite question - Abagail - 05.08.2015

You don't need to specify any WHERE clauses if that's what you mean. It will simply update all existing rows.