-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
分类及Tag数据库设计修改 #79
Comments
Closed
关系表,最少还有一个“type”类别字段,用于区别category,tags,meta等不同的用途 |
pr_postid, pr_cateid, pr_tagid,是错误的,应该是id,postid,relationid,type,key,value这几个字段! |
@rainbowsoft 都TM过去了四年了 |
现在 6 年了。。 |
现在7年了。。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
为提升分类及Tag相关效率,现提出一种新的数据库设计方案。
现有方案是
zbp_post
内含log_CateID
和log_Tag
两个字段,故只能支持单分类,Tag检索效率也极其低下。在这里提出一种新的解决方案,可完美解决多分类及Tag索引问题。同时也对各库内meta
进行修改,解决meta查询问题。解决方案
分类及Tags
zbp_post_relationship
,内含字段pr_postid
,pr_cateid
,pr_tagid
。即可查询出此Tag下所有文章。分类同理。
Meta
zbp_meta
,内含字段meta_type
,meta_pointid
,meta_name
,meta_value
。兼容性问题
log_CateId
和log_Tag
字段。$post->Category
需要改为$post->Categories
($post->Category
指向Categories[0]
)The text was updated successfully, but these errors were encountered: