append not add

I have this line that works fine. It replaces the current data with new data. No problem.

      update_post_meta ($ids[$i], 'ProductDescription', $descr[$i]);

However, rather than overwrite the previous data, can I simply append the new data after the old data instead somehow?

Sounds easy.

Yes, you can append new data instead performing plain ‘update’ so we can keep those previously entered data. Basic INSERT will do this…

How you pull out the most updated data now depends on how you structure your table. Can you post your table structure here so we can know whether you need to redesign it or not?

hmm… I can’t seem to see how INSERT does this.

INSERT seems to add data into a new cell not appending to an existing cell…I might be wrong!

Only way seems to be to SELECT data and JOIN it together with the new data. (Help needed!). It would be nicer if there was an APPEND command that did it for me.

Sponsor our Newsletter | Privacy Policy | Terms of Service