13.11.2018, 23:51
Single query should be faster, although it can get pretty confusing if you need to update a really large set of data.
If you don't care about the result and you are using tquery (as I see in the code) then I think it's not really any big deal, you could go with 2 queries if you really require it. I would however stick to single query as long as it works, though I'd keep a big global array for formatting such things instead of declaring them in the function's scope, as it's a massive performance improvement especially if you need to do it in many places.
I have a global array caled fmt which is over 2500 cells big and I use it for every string formatting, including mysql queries. This way I hardly ever need to declare any new variables for my strings.
If you don't care about the result and you are using tquery (as I see in the code) then I think it's not really any big deal, you could go with 2 queries if you really require it. I would however stick to single query as long as it works, though I'd keep a big global array for formatting such things instead of declaring them in the function's scope, as it's a massive performance improvement especially if you need to do it in many places.
I have a global array caled fmt which is over 2500 cells big and I use it for every string formatting, including mysql queries. This way I hardly ever need to declare any new variables for my strings.

