Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Maximum length of MySQL query?
- Bert Sierra
October 3, 2004, 5:13 am
rate this thread
string supplied to the mysql_query() function? It appears that strings
themselves can go well beyond 65,536 characters: the PHP manual does not
seem to specify the upper limit, but in one test I was able to construct
a 1,000,960 character string without a hitch.
The queries my code will construct will be considerable smaller --
between 3,500 characters and roughly 20,000 characters. Can anyone tell
me if a 20,000-character UPDATE will cause problems, given the code
below and assuming that the $updateSQL string contains valid MySQL code:
$database_VoIP_Connection = ...;
$VoIP_Connection = ...;
$updateSQL = "UPDATE ... SET ... WHERE ...";
$Result1 = mysql_query($updateSQL, $VoIP_Connection) or
I can chop up the query into smaller pieces if need be, but I'd rather
execute a single UPDATE for speed and simplicity.
-- Bert Sierra
Re: Maximum length of MySQL query?
20,000-character should work fine with mysql > 4
Look here for more info: