Posts: 64
Threads: 17
Joined: Oct 2016
Reputation:
0
It is best to use only one string for all MySQL updates in my GameMode with "tquery"?
Posts: 1,206
Threads: 39
Joined: Feb 2014
Reputation:
0
Can you provide an example of what you mean?
Posts: 64
Threads: 17
Joined: Oct 2016
Reputation:
0
Make a global string. = "new queryUpdate[200];".
System 1 = "mysql_format(SQLCon, queryUpdate, sizeof(queryUpdate), " ... etc "", "mysql_tquery(SQLCon, queryUpdate);"
System 2 = "mysql_format(SQLCon, queryUpdate, sizeof(queryUpdate), " ... etc etc "", "mysql_tquery(SQLCon, queryUpdate);"
All MYSQL updates in my GM.
Posts: 1,206
Threads: 39
Joined: Feb 2014
Reputation:
0
Oh. No, that's never a good idea. The more scripts you create, the sooner you'll find yourself creating queries longer than 200 characters. But you'll also find yourself creating a lot of queries much smaller than 50 characters. All of the remaining indices will be wasted space.
Posts: 4,759
Threads: 33
Joined: Dec 2013
Reputation:
0
don't "use only one string for all MySQL updates in my GameMode with "tquery""
Posts: 64
Threads: 17
Joined: Oct 2016
Reputation:
0
The problem would only be used space used?
Posts: 1,206
Threads: 39
Joined: Feb 2014
Reputation:
0
No. If you format the query somewhere and forget about it, it's globally formatted. It's still a global variable! This will lead to long debug sessions trying to find the reason why something is malfunctioning. Moreover, wasting space like that is frowned upon because it's very bad practice.