Working with Variables

This module uses StringProperty almost in every SELECT, INSERT OR UPDATE statements.

But what to do if we need to update INT column in Mysql with Number Variable? It is not convenient to store Numbers in Strings... So I decided to make some universal way to work with Variables with Mysql for Game Creator module.


Global Variables: {Global:[VariableName]} Local Variables: {Local:[VariableObject]:[VariableName]}

How to use:

For example you want to update score column in Mysql Database with some Local Number Variable. For example, you have LocalVariable object on your scene, it has Variable "score" with value 10. Also you have Global Variable "playerName".

This example shows how to use this syntax.

(Set clause) In Column1 section - Equal value, you must write {Local:LocalVariable:score}

Local - will define Variable type to use LocalVariable - the name of Variables game object in your scene score - name of your Variable in LocalVariable game object.

(Where clause) In Column 2 section Equal value is: {Global:playerName}

Global - will define the type of Variable to use playerName - name of the Variable

This will successfully update score of playerName that stored in GlobalVariable with 10

Last updated