php - MySQL, CONCAT, the result is null sometimes
731
Im putting big data to table, to aLONGBLOB
field. First I create the record:
INSERT INTO mytable VALUES (1, '');
then in aforeach
cycle I put the sliced data:
foreach (str_split($content, 1024*512) as $item)
{
UPDATE mytable SET BIGCONTENT = CONCAT(BIGCONTENT, $item) WHERE ID = 1;
}
yes, the field is growing, but after a few turn, (its about 1MB) it becomesnull
! I tried another way:
UPDATE mytable SET BIGCONTENT = CONCAT_WS("", BIGCONTENT, $item) WHERE ID = 1;
still the same. Whats the problem?