Home > Blockchain >  How to add, insert and update JSON value into MYSQL?
How to add, insert and update JSON value into MYSQL?

Time:12-10

I have one JSON column ('posts') in MYSQL table . When somebody posts something i want to add this data to this column like this { "status": "active", "id": "112" }

I can only do this "UPDATE users set posts = ? WHERE id = ? " But it deletes and writes data into 'posts' . I need to append data to the beggining of json data. My question is simple example of adding json data and updating data (for example where id='112' status='archived')

Thanks in advance

CodePudding user response:

Please follow this link for insert JSON data in DB.

How to create and insert a JSON object using MySQL queries?

Thanks

CodePudding user response:

Here are all MySQL Functions That Modify JSON Values

  • Related