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.