当作者更新文章时,动态传递新标签名称。例如,标签未预定义。作者写完文章后,作者创建新标签,但更新文章新标签和现有标签我想更新文章表中的相应文章,标签是新的,然后在标签表中创建新标签,用tag_hook表映射更新
表1:文章
-----------------------------------
| article_id | title | desc |
-----------------------------------
| 1 | php mysql | lorem |
-----------------------------------
| 2 | java oops | lorem |
-----------------------------------
表2:标签
--------------------------
| tag_id | tag_name |
--------------------------
| 1 | sql |
--------------------------
| 2 | java |
--------------------------
| 3 | python |
--------------------------
| 4 | ruby |
--------------------------
Tbale 3:tag_hook
-----------------------------------------------
| hook_id | tag_id | article_id | type |
-----------------------------------------------
| 1 | 1 | 1 | article |
-----------------------------------------------
| 2 | 1 | 2 | article |
-----------------------------------------------
| 3 | 4 | 2 | article |
-----------------------------------------------
| 4 | 4 | 1 | article |
-----------------------------------------------
如果我想在tag_hook表中更新第1条,请添加两个新标签(2,3 tag_id)
帮助我谢谢