How to update mysql column using array
P粉098417223
P粉098417223 2024-02-25 22:36:28
0
1
292

I am using mysql, I have table "wp_notification", here is the current structure of the table

id              UserId                PostId              status
1               s:1:"8";              26                  accept

In the "UserId" column I saved the user's Userid in "array" format using the "serialize" function, but now I want to update (add one more user id in this column) this column So what do I do? Is it ok to just use mysql query?

P粉098417223
P粉098417223

reply all(1)
P粉790819727

You do not need to update this column. You can add another user ID in the future/current cell of this column.

However, it is worth noting that using "serialized" output strings as Ids in the database is not a good solution. See Normalization in MYSQL.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!