[Optimize] How to...
Hello everyone,
Question: which of types variables to be best place for storing data for menus? Possible answers: KeyValues? 2 x ArrayList? Global MenuHandle? Which of this will be faster? Ex: HTML Code:
data - "Key1" => "Helloworld" <- 2xArrayList? KeyValues? MenuHandle? |
Re: [Optimize] How to...
I'm fond of KeyValues since you can load a configuration file and iterate over the KeyValues handle, adding the menu entries as you go.
Never used a global Menu handle, but if you're able to generate the menu once and reuse the handle just for displaying, that would probably be better. |
Re: [Optimize] How to...
Quote:
Question2: How to check MySQL connection? Is connected or not connected? PHP Code:
|
Re: [Optimize] How to...
Quote:
Handle? Or Database? -> Database null or INVALID_HANDLE -> null Also for connection use this little beauty https://sm.alliedmods.net/new-api/dbi/Database/Connect and for queries https://sm.alliedmods.net/new-api/dbi/Database/Query Something like this for reference: PHP Code:
|
| All times are GMT -4. The time now is 13:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.