25.06.2015, 11:49
Quote:
Oh! Yeah i have searched on forum and got this method. But I want to know from a good scripters is it good if i use like this? But I would like to have a solution in my method. Anyone?
|
Maybe in case of very large query in will be 1-2ms slower than using one format() up to 512 characters. I use that for my life and never got any problems.
Good:
+ You can create very large queries without reaching 512 char line limit
+ Everything is clear, you will probably never make a mistake in format() arguments order
+ It's the only way to format a big query and to execute it without splitting into smaller ones
+ Mysql server executes only one query - it's a big +
Bad:
- It uses +64 cells of memory for tmp var
- Someone suggested not to create long strings, but I think that a frw bytes of wasted memory is better than ten Mysql queries.