1

According to the answer to this question: What is maximum query size for mysql?

The max value is shown in bytes and not characters, so I can't decide when the time to split the query is. Would be even better if I could check that while the query is still a string in php since its length will be flexible.

Community
  • 1
  • 1
Nadroev
  • 363
  • 1
  • 11

1 Answers1

3

You can simply use strlen() to measure the byte size of your query in php.

See manual at http://www.php.net/manual/en/function.strlen.php

Note: strlen() returns the number of bytes rather than the number of characters in a string.

maxhb
  • 8,554
  • 9
  • 29
  • 53