SA-MP Forums Archive
Using if(..) in mysql - 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: Using if(..) in mysql (/showthread.php?tid=347122)



Using if(..) in mysql - SomebodyAndMe - 31.05.2012

Currently setting up my mysql system.

I have a bool which has to be loaded from the database, and has to be saved in, how can i do those two?

These are the lines who has to be converted in true or false.

pawn Код:
mysql_fetch_field("Muted", savingstring); APlayerData[playerid][Muted] = strval(savingstring); //10.
    mysql_fetch_field("RulesRead", savingstring); APlayerData[playerid][RulesRead] = strval(savingstring); //11.
    mysql_fetch_field("SRT", savingstring); APlayerData[playerid][SRT] = strval(savingstring); //12 .
    mysql_fetch_field("PSwork", savingstring); APlayerData[playerid][PSwork] = strval(savingstring); //13



Re: Using if(..) in mysql - MadeMan - 31.05.2012

What's wrong with it now?


Re: Using if(..) in mysql - SomebodyAndMe - 31.05.2012

It are bools those 4, and I have to check whether it's True or False, but I have no idea how to script it in the current. (shown above)


Re: Using if(..) in mysql - SomebodyAndMe - 31.05.2012

Anyone?