29.01.2017, 11:42
Here are things that you need to look on:
- Use foreach
- Make global variables static so as same memory won't be allocated for these varaibles on each execution of abstract machine
- Also make other local variables static that need not be created again and again.
- Make a global variable (putting it in enum would be nice for readability) for holding names so as they are intialised during connection and can be used through out the script without creating another.
- Use bool tags for variables that need to treat as boolean in logic wise so as to increase readability.
- Normalise your database.