fashion star
记载着每一天的点滴,无论开心与不开心
kasegla
暱稱: kasegla
性別: 女
國家: 中國內地
地區: 其他地區
« January 2015 »
SMTWTFS
123
45678910
11121314151617
18192021222324
25262728293031
最新文章
Fashion Handbag Tren...
Fashion Designer Che...
How to Choose Approp...
How To Choose Sungla...
2014-03-26
文章分類
全部 (92)
訪客留言
最近三個月尚無任何留言
每月文章
日誌訂閱
尚未訂閱任何日誌
好友名單
尚無任何好友
網站連結
尚無任何連結
最近訪客
最近沒有訪客
日誌統計
文章總數: 92
留言總數: 0
今日人氣: 10
累積人氣: 6264
站內搜尋
RSS 訂閱
RSS Feed
2013 年 10 月 17 日  星期四   晴天


Articles which contain favored tags 分類: 未分類

Now I want to give the user the opportunity to add tags to his "favored tags list". Then the user should only see news articles which contain one of the favored tags air max 90 women's.

Assuming the user Bob has favored the tags "barack obama", "nba", "new jersey" and "dogs" airmax 2010 red black & white. He should only see articles containing at least one of these four tags.

How could I code a PHP/MySQL script which achieves this? I think my database structure is not adequate for this purpose air max 95, is it? I would have to make DB queries like this:

"SELECT FROM news WHERE id IN (SELECT article FROM tags WHERE tag IN ('barack obama', 'nba', 'new jersey', 'dogs'))"

This query would run for a long time, wouldn't it? There must be a database structure which is more appropriate than mine air max for women. Do you have an idea for this problem? Which DB structure do I need and what queries must I use then?






訪客留言 (返回 kasegla 的日誌)

訪客名稱:
電郵地址: (不會公開)
驗證碼:  按此更新驗證碼 (如看不清楚驗證碼請點擊圖片刷新)
俏俏話: (必需 登入 後才能使用此功能)
[ 開啟多功能編輯器 ]