How to update serialized data in DB Table field?
I want to store serialized data to reduce count of queries but don't have idea how to update them.
How to update serialized data in DB Table field?
I want to store serialized data to reduce count of queries but don't have idea how to update them.
You have to fetch the serialized data, unserialize()
it, change it, serialize()
it back again and update the table row in the database with the new serialized data.
This is too slow / troublesome, and it's the reason you shouldn't be storing serialized data in the DB.