I have seen these things in MYSQL in open-source programs. What are these things?

Source: Internet
Author: User
In his user table, there is such a field called email_setting: the value in it is like this: a: 2: {s: 9: & quot; FOLLOW_ME & quot ;; s: 1: & quot; N & quot; s: 10: & quot; NEW_ANSWER & quot; s: 1: & quot; N & quot ;;} what does this mean? In the user table, there is a rencent_topic field, which is also like this: a: 1... in the user table; there is such a field called email_setting:
The value is as follows:
a:2:{s:9:"FOLLOW_ME";s:1:"N";s:10:"NEW_ANSWER";s:1:"N";}
What does this mean?
The user table contains a rencent_topic field, which is also like this:
A: 1: {I: 0; s: 6: "makeup ";}
Why do some fields have such strange characters?

This open-source program is called wecenter.
Thanks for the answer downstairs. When storing a binary data, it can be serialized. But I want to save an array. I can store the data in json or serialized format.
Who is better?

Reply content:

In his user table, there is such a field called email_setting:
The value is as follows:
a:2:{s:9:"FOLLOW_ME";s:1:"N";s:10:"NEW_ANSWER";s:1:"N";}
What does this mean?
The user table contains a rencent_topic field, which is also like this:
A: 1: {I: 0; s: 6: "makeup ";}
Why do some fields have such strange characters?

This open-source program is called wecenter.
Thanks for the answer downstairs. When storing a binary data, it can be serialized. But I want to save an array. I can store the data in json or serialized format.
Who is better?

Upstairs is right. To add, because the database cannot store arrays, it can only convert its php serialization function into a string.
We can useunserialize()Deserialize the string. The result is:

Array ([FOLLOW_ME] => N [NEW_ANSWER] => N) Array ([0] => makeup)

This is serialized data. In php, strings are processed using serialize ().

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.