For more information about multitable and serialization, please give me some ideas and methods.

Source: Internet
Author: User
For more information about multi-table and serialization, please give me some ideas and methods. let me do channel management ~~~~~~~ The basic process is 1. add channel-add tag-the problem is in the tag. the tag needs to be serialized, the serialized ID is stored in the database, for example, ['2' => 'A, when adding a database, you also need to determine whether the tag content field exists in another tag table. here is what I came across based on my own ideas .. ID is saved. how can I determine whether a tag exists or not based on the ID?
$ See_tag = [];
Foreach ($ tags as $ k => $ v ){
$ See_tag [] = strval ($ v );
}
If (array_diff ($ see_tag, $ tagval )){
Self: output (['title' => 'tag does not exist', 'type' => 'error']);
}
Compare the input content with the fields in another table! Okay. however, during front-end display, the normal text content needs to be deserialized, but the result is displayed with my ID. how can I obtain the content that is not stored after the ID based on the saved ID without affecting the modification?


Reply to discussion (solution)

Now, the front-end does not know how to associate it with another table based on the tags next to the ID!

When you store the id, you also store the tag in another table. Otherwise, it is unrealistic for you to directly retrieve the tag.

In addition, you can also encrypt the tag with rsa, encrypt it into an id and store it in the database. then, decrypt the tag when it is obtained. (This method is not very good because it will increase the system load .)

Boss asked me to do this. he said yes !....

Moderator... please help me!

Since your boss called you to do this, you should ask your boss how to write it!
We won't come up with such an abnormal solution like your boss.

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.