Nadroev Nadroev - 2 years ago 174
SQL Question

How to check the current query packet size for MySql?

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.

Answer Source

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

See manual at

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download