#1

It is best to use only one string for all MySQL updates in my GameMode with "tquery"?
Reply
#2

Can you provide an example of what you mean?
Reply
#3

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.
Reply
#4

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.
Reply
#5

don't "use only one string for all MySQL updates in my GameMode with "tquery""
Reply
#6

The problem would only be used space used?
Reply
#7

Quote:
Originally Posted by KessMan
Посмотреть сообщение
The problem would only be used space used?
Read my post on a topic with a similar question here.
Reply
#8

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.
Reply
#9

Quote:
Originally Posted by AndySedeyn
Посмотреть сообщение
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.
It's just not convenient...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)