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?

People are also looking for solutions to the problem: javascript - how to connect jquery ui auto-complete widget with database?

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.